English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is the value of x

2007-10-31 09:40:06 · 2 answers · asked by Nick L 1 in Science & Mathematics Mathematics

2 answers

In C++ and Java, += is the addition assignment operator. It's equivalent to saying:
x = x + 7

Since x started with a value of 4, it will now have a value of 11.

2007-10-31 09:43:23 · answer #1 · answered by Puzzling 7 · 0 0

This looks like a part of a script.

at x = 4; x is defined as 4

x += 7 is the same as 'x = x +7', however in maths that's never correct. The meaning of it is, x gets a new value, which is 7 higher than the old value.

The old value was 4, increased by 7.

4+7=11

2007-10-31 16:43:19 · answer #2 · answered by Mich90 2 · 0 0

fedest.com, questions and answers