Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

1. Define mass and mediated communication

Answered: 1 week ago