Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that calculates the calories burned while running over a given number of miles. While several factors determine how many calories are burned
Write a program that calculates the calories burned while running over a given number of miles. While several factors determine how many calories are burned during a mile run, for this program, 80 calories are burned for every mile of running. The cumulative calories burned during a run can be calculated as: Calories * Distance For example, if a person runs 5 miles, the total calories burned is 400. After 3 hours, the person has burned 240 calories. The program should ask for the number of miles ran. It should use a loop to display the total calories burned after each mile. For example, if the user ran 5 miles, the program should display a report similar to the following: Do not accept a value less than 1 or greater than 20
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started