Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help finishing this code, please help and zoom in if needed A person will burn approximately 45 calories per minute running on a treadmill.
need help finishing this code, please help and zoom in if needed
A person will burn approximately 45 calories per minute running on a treadmill. Write a program that uses a while loop to display the number of calories burned after 10 minutes in 2 minute intervals until a user-defined upper minute limit is met. Use Pr5-6.cpp as an example. A good name for your counter variable is minutes. What should be the initial value of the counter variable? A good name for your upper limit variable is limit. This will be the value you read in from the user. Inside the loop, your program should compute the calories burned based on minutes. Before the end of the loop, minutes should be incremented by what? When the input is as shown in Figure 1. your program should produce the output as shown in Figure 2. Figure 1: (input) 20 Figure 2: (output) 45 54 63 Calories burned in 10 minutes: Calories burned in 12 minutes: Calories burned in 14 minutes: Calories burned in 16 minutes: Calories burned in 18 minutes: Calories burned in 20 minutes: 72 81 90 286488.1697136 5 include
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