Question: C++ Assignment (Please post the solution and the output) /* Please submit this program in pseudocode */ Requires: Variables, data types, and numerical operators, basic

C++ Assignment (Please post the solution and the output)

/* Please submit this program in pseudocode */

Requires: Variables, data types, and numerical operators, basic input/output, logic (if statements, switch statements), loops (for, while, do-while)

Write a program that continues to ask the user to enter any number other than 5 until the user enters the number 5. Then tell the user "Hey! You weren't supposed to enter 5!" and exit the program.

1) Modify the program so that after 10 iterations if the user still hasn't entered 5 will tell the user "Wow! You're more patient than I am. You win!" and exit.

2) Modify the program so that it asks the user to enter any number other than the number equal to the number of times they've been asked to enter a number. (i.e on the first iteration "Please enter any number other than 0" and on the second iteration "Please enter any number other than 1" and etc. The program must behave accordingly exiting when the user enters the number they were asked not to.)

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!