0

Can someone explain me this? Cause i dont understand it

11th Mar 2018, 5:05 PM
Flash #3
Flash #3 - avatar
8 Antworten
+ 12
it means : x = x+x+6
11th Mar 2018, 5:18 PM
Mazin Ayash
Mazin Ayash - avatar
+ 12
when you type x = 10 you assign 10 to x. and when you type x += 10 this means add 10 to the current value of x. //now x = 20
11th Mar 2018, 5:20 PM
Mazin Ayash
Mazin Ayash - avatar
+ 1
x = 1; here x is variable and it's value is 1 x +=5; here += will add 5 to x, that means x is 6. That's not a big issue bro 😊
11th Mar 2018, 5:24 PM
Raziul Islam
Raziul Islam - avatar
0
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
11th Mar 2018, 5:07 PM
Walef
Walef - avatar
0
yeah but i dont understand this "x+=x+6" and that stuffs
11th Mar 2018, 5:11 PM
Flash #3
Flash #3 - avatar
0
thanks !!
11th Mar 2018, 5:43 PM
Flash #3
Flash #3 - avatar
0
one last thing. i yave doubts with the prefix and the postfix (++×; and ×++;)
11th Mar 2018, 5:45 PM
Flash #3
Flash #3 - avatar
0
x++ will produce the value then update (increment) and ++x will update then then produce the value example: x = 1 y = x++ here x is 2 and y is 1 but x = 1 y = ++x here x is 2 and y is 2
11th Mar 2018, 5:50 PM
Raziul Islam
Raziul Islam - avatar