Question: Write a complete C++ program that does the following: 1. The program asks the user to enter an integer between 1 and 20. 2. If

 Write a complete C++ program that does the following: 1. The

Write a complete C++ program that does the following: 1. The program asks the user to enter an integer between 1 and 20. 2. If the user enters an illegal number, the program repeatedly asks the user to correct their number. 3. If the user has not entered a correct number after 10 attemps, the program chooses 10 as the user's number. 4. The program prints the cube of the user's number. A sample run of the program: Enter an integer between 1 and 20: 100 Out of range. Enter an integer between 1 and 20:-1 Out of range. Enter an integer between 1 and 20: 5 The cube of your number is 125

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!