top of page
Incrementing Variables By More Than One
To increment variables we may also use the += operator. This will make your variable equal to itself plus a number. This of course may be interchanged with -= *= and /=
Example:
Output:
The statement will add 5 each time until the condition is met.
Back
Next
bottom of page