0
increment operator
Cam someone explain me what does this "+=" do ?
4 Answers
+ 2
It's equivalent to adding the current value of whatevers on the left side of the equal sign by whatever is on the right side of the equal sign.
Example/
int x = 5;
x += 10;
This is equivalent to writing:
int x = 5;
x = x + (10);
So x will become 15 in both cases.
+ 2
x+=y means x=x+y;
x-=y means x=x-y;
x*=y means x=x*y;
x/=y means x=x/y;
+ 2
you're welcome
+ 1
tanks
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
2 Votes
Тренажер кода
0 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes
Number of Ones ( C++ ) question!
1 Votes