count = count + 1;
It increases count
by one.
count
If the answer is not clear, remember the two steps of an assignment statement:
Say that count
is 2.
When the above statement executes,
first the expression count + 1
is evaluated, resulting in 3.
Second the 3 is put
in count
.
What does this statement do:
count = count + 2;