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, 90 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 450. After 3 hours, the person has burned 2 calories.
The program should ask for the number of miles ran. It should use a loop to display the total calories burned after eachmile. For example, if the user ran 5 miles, the program should display a report similar to the following:
Miles run Calories Burned
1 90
2 180
3 270
4 360
5 450
Input Validation: Do not accept a value less than 1 or greater than 30
Note: You must use a loop to calculate the calories burned after each mile and generate a table similar to the one above to receive credit.
Submit your .java file in the Dropbox.
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
Write a program that calculates the calories burned while running over a given number of miles....
Create a Python program that asks the user how many miles they think they may run. The program should also ask them how much they weight. The program should then use a loop to calculate and print the number of calories burnt while running each mile. o Assume that a person burns 1 calorie per pound during each mile of running
please help part one) Calories Burned Running on a particular-treadmill you burn 3.9 calories per minute. Design a pro- gram that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes. 3 part two) Sum of Numbers Design a program with a loop that asks the user to enter a series of positive num bers. The user should enter a negative number to signal the end of the series. After all the...
Running on a particular treadmill you burn 3.4 calories per minute. Write a program that uses a loop to display the number of calories burned after 5, 10, 15, 20, 25, 30 and 35 minutes. C++
Running on a particular treadmill, you burn 4 calories per minute. Write an 80x86 assembly program that uses a loop to display the number of calories burned after 5, 10, 15, 20, 25, and 30 minutes. PLEASE WRITE an 8086 ASSEMBLY program!
Running on a particular treadmill you burn 3.9 calories per minute. Write a program that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes. Must be in VBA using option explicit
Speeding Violation Calculator: Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver’s speed. Validate the input as follows: The speed limit should be at least 20 but not greater than 70. The driver’s speed should be at least the value entered for the speed limit (otherwise the driver was not speeding).Once correct data has been...
Hello. I want to write a function in C program to track calories for specified fitness activities i.e. run, walk, bike etc. I am trying to make an array with the activities and return calories burned per minute for each workout. The function will keep running until user tells it to stop. "maybe 'while' loop (Y/N)" or something like that. The main function will call the activity function and a few printf/scanf. My code looks pretty bad so if you...
In Java. Use the concept of LOOPS: 2.Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should display a table showing the salary for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the...
In C language using printf and scanf statements: Write a program to display a histogram based on a number entered by the user. A histogram is a graphical representation of a number (in our case, using the asterisk character). On the same line after displaying the histogram, display the number. The entire program will repeat until the user enters zero or a negative number. Before the program ends, display "Bye...". The program will ask the user to enter a non-zero...
Write a Java program that calculates how much a person would earn after a period of time, according to the following rules: 1. The starting salary for the first day is $1. 2. The salary will double each day. Ask the user to input the number of days worked. The output should display how much the salary was for each day worked, and show the total pay at the end of the work period. Get output similar to the sample...