Question: How to limit user input with do while loop, for loop or if. I'm trying to make a program, but am unsure how to stop

How to limit user input with do while loop, for loop or if.

I'm trying to make a program, but am unsure how to stop the user from enter a number smaller than what i want. I'm want to use an if, while or do-while loop. Any Ideas?

I know user input, but don't really know while or if. Any help would be great.

cout << "How many rocks do you want from the ground? You can choose for 5 or more."; cin >> rockPile;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!