Question: Programming in C Loops (counting loops and sentinel loops) Instructions: 1. Create a program that asks the user to enter a number from 1 to

Programming in C Loops (counting loops and sentinel loops)

Instructions: 1. Create a program that asks the user to enter a number from 1 to 25.

2. Print the statement I'd rather be doing something else the number of times entered by the user using a for loop.

3. Print the statement Programming is easy the same number of times using a while loop.

4. Print the statement I like to have fun the same number of times using a do/while loop.

5. Next, prompt the user to enter a series of numbers until the user enters a -1 to stop.

6. As long as the number is not -1, add the input number to an ongoing sum and print the sum and the number on the screen.

7. When the user enters a -1 print the message Have a Great Day :) and end the program. the -1 should not be added to the sum.

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!