0
Could any one can explain what is the meaning of the line .... "total+=x"
6 ответов
+ 1
total+=x is same as adding value of x in total and then storing the final value in total variable i.e total = total + x;
+ 9
total+=x; is shortened form of
total =total+x;
+ 1
Those are called Assignment Operators.
a += b is equivalent to a = a + b
a -= b is equivalent to a = a - b
a *= b is equivalent to a = a * b
a /= b is equivalent to a = a / b
0
in that line first which operation is going to operate ?
0
+= according to bodmas ?
0
tq