Lessons
C++ · Text and Array · 19. Reading a Whole Line
step 1 of 7
cin reads one word
cin >> first reads ONE word. I stop at the first space.
The rest waits in the INPUT for the next cin.
Mission
Read a second word into last and print Last: Erdene under it.
PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
← press me!
Press RUN to see what this program does.