Lessons
C++ · Storing Information · 9. Operators and Expressions

step 1 of 7

Add and keep

score = score + 5; is long to type. score += 5; means exactly the same: add 5 and keep it in the box.

Mission

Write the middle line the short way, with +=. Same answer?

PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
← press me!
readyscreen

Press RUN to see what this program does.

Do the mission and Next turns green.

Operators and Expressions