Question: What happens if we put one loop inside of another loop? Write a program which repeatedly prompts the user to enter an integer. If they

 What happens if we put one loop inside of another loop? Write a program which repeatedly prompts the user to enter an integer. If they enter 0 or a negative number the program should quit, otherwise it should print out the integers from 1 up to the number they entered. E.g., if the user entered 5 it would print 1 2 3 4 5 and then prompt them to enter another number. 

For intro to c++ class

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!