Lessons
C++ · Bigger Programs · 24. Functions
step 1 of 7
Your own command
A function is a command you invent. Write it once above main, give it a name, then use it as often as you like.
cheer(); calls it: I jump in, do its lines, and come back.
Mission
Call cheer three times, then RUN.
PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
← press me!
Press RUN to see what this program does.