Question: Remember to review the cpp directions and options pdf file: If you downloaded Visual Studio, you will be submitting a file named Lab4.cpp If you

  • Remember to review the cpp directions and options pdf file:
  • If you downloaded Visual Studio, you will be submitting a file named Lab4.cpp
  • If you use an online C++ compiler, you can submit your code in the text entry box.
  • In this lab, you are to use what you learned about Control Structures (Selection) in chapter 4.
  • Redo Lab#3 but use ado whileloop to repeat the menu options.
  • Make sure the menu display again even if the user puts in a character instead of a number, that is, do input error checking right after the input of the menu option. We learned about this in chapter 3.

Example of a do...while loop:

// do something until the number equals 3

int number;

do

{

cout << "Enter a number: ";

cin >> number;

//input error checking happens here. you need to clear input stream, ignore the rest of the input line

// then prompt the user and take input again

// process a task until user enters a 3 for number.

}while(number !=3);

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 Programming Questions!