Welcome back. So you're ready for the section challenge.
Let's go over the challenge.
Create a c++ program that asks the user
for their favorite number between 1 and 100,
then read this number from the console.
Suppose the user enters number 24.
You want to display the following to the console amazing. That's my favorite number too.
That's exactly what we did in our first program.
Now here's the little bit of a twist.
You also want to display, no really 24 is my favorite number.
Below are two sample runs of the program. So in this case, we're prompting the user.
There's our prompt. The user enters 24,
and we print out amazing. That's my favorite number too.
No really 24 is my favorite number.
And if I run this program again and I type in 75, I'll get 75.
So let me run the program for you so you can see what it looks like.
Here we go. This is the prompt to the user. Enter your favorite number
between 1 and a 100. So let's say I typed in a 50, and press enter.
And you're going to display to the user amazing that's my favorite number too.
No really 50 is my favorite number.
That's it. That's the challenge.
That's it. That's the challenge. Give it a shot and then come back to the next video,
and we'll work through the solution together.