This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Recorsi
wrote ...
2018/4/6
How do i add more than 1 to an int value?
Recorsi
2018/4/6
#
For example i have:
int X = 10;
If i type X++; it adds one to X How can i add more than one to X?(so that X=12 for example)
danpost
2018/4/6
#
Recorsi wrote...
If i type X++; it adds one to X How can i add more than one to X?(so that X=12 for example)
x = x+2; // or just x += 2;
Recorsi
2018/4/7
#
Thanks
You need to login to post a reply.
X