Question: Write a C program (not C++) that has the following loops: 1. A 'while' loop that prints out the numbers 1 through 10. 2. A

Write a C program (not C++) that has the following loops: 1. A 'while' loop that prints out the numbers 1 through 10. 2. A 'while loop that prints out the numbers 10 through 100, in steps of 10. 3. A 'do - while' loop that prints out the numbers 1 through 10. 4. A 'do - while' loop that prints out the numbers 10 through 100, in steps of 10. 5. A 'while' loop that prompts the user for a number, and stays in the loop until they enter a number greater than 0. (we are saying that we want a Positive number greater than zero) 6. A 'do - while' loop that prompts the user for a number, and stays in the loop until they enter a number less than or equal to 0. (we are saying we want a negative number (or zero)). 7. A 'while' loop that prompts the user for a char answer, and stays in the loop until an answer of y (or Y) is entered. (y or Y is good - gets us out of the loop ) 8. A 'for' loop that iterates 10 times and prints out the numbers 0 through 9 (one number per iteration). 9. A 'for' loop that iterates 10 times and prints out the numbers 9 through 0 (one number per iteration), use steps of -1. 10. A for loop that loops 5 times, asking the user for a number each time, and printing out the loop iteration number, and the number they entered times the loop count. (Example output: Enter a number: 5 Loop count: 1 Answer 5 Enter a number: 3 Loop count: 2 Answer 6 Enter a number: 42 Loop count: 3 Answer 126 )

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!