Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions