Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

lab6 Loops(1)- Protected View-Last sav.. SavedSign in Fle Home Insert Design Layout References Mailings Reviow iew Help Tel me Lab 6 Part A: Program Development

image text in transcribed
lab6 Loops(1)- Protected View-Last sav.. SavedSign in Fle Home Insert Design Layout References Mailings Reviow iew Help Tel me Lab 6 Part A: Program Development Sheet Section: 1003 Name: Class time 1. Understand the problem - Assume that running on a treadmill burms 3.9 calories per minute. Write a program that uses a while loop to display the number of calories burned in increments of 5 minutes, starting with 5 up to the maximum minutes entered by the user. For example, if the user entered 25 as the maximum minutes, start your loop control variable at 5. The first time through the loop display the calories burned during 5 minutes of exercise and increment your loop control variable. The next time through the loop, display the calories burned for 10 minutes of exercise and so on until the calories buned for 25 minutes has been displayed. a. Fill in the values for the last two lines. Calories Burned on Treadnill Minutes Calories Burned 19.5 39.0 58.5 10 15 20 25 b. What kind of while loop will you use for this program: ting loop 2. List constants and variables (inputs, outputs). _seatinel-controlled loop Inputs Outputs 3. Write the algorithm -the list of steps needed to solve the problem. No C+ statements please! Use words like Get, Calculate, Display. What is your loop control variable? What will you initialize it to? What will yoru compare it to in the while loop condition? How will it be changed inside the loop so that your condition eventually becomes false

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions