Ask the User
Get user input from the console using cin.
We'll cover the following...
We'll cover the following...
You’ve printed messages. You’ve stored the text. Now, it’s time for your program to listen. In this lesson, you’ll use cin to get user input from the keyboard.
Goal
You’ll aim to:
Use
cinto take input.Store input in variables.
Build interactive programs that react to users.
Ask for a name
Here’s how cin works in C++: