Question: C ++ program project. Thank you so much for your time. Write a program that calculates the speed and pace of a runner's recent run

C ++ program project.

C ++ program project. Thank you so much for your time. Writea program that calculates the speed and pace of a runner's recentThank you so much for your time.

Write a program that calculates the speed and pace of a runner's recent run and then predicts how long it will take the runner to complete an upcoming race. The program will ask the user for the distance of the recent run (in kilometers) and the time (in minutes) taken to complete the run. Calculate the runner's speed (in km/ hour) using the following formula: Speed km/hour=timehoursdistancekm Calculate the runner's pace (in seconds/kilometer) using the following formula: Pace seconds/km=distancekmtimeseconds Hint: Use the fact that there are 60 minutes/hour and 60 seconds/minute to convert the time you have in minutes to the appropriate time interval for these formulas. After displaying both the speed and the pace for the completed race, your program will ask the user for the length of the upcoming race (in kilometers) and calculate the predicted time to finish the upcoming race (in minutes) using Riegel's race time predictor formula: Do not forget to convert the finish time from minutes to seconds before using this formula. Display the predicted finish time on the computer screen. Make all variables and constants type double. Display all values rounded to precisely two digits to the right of the decimal point. Do not forget to end your program with a newline. Enter the distance run in your most recent run (in km): 5 Enter the time it took to complete the run (in minutes): 25 Your speed was 12.00km per hour. Your pace was 300.00 seconds per km. Enter the length of the upcoming race (in km):10 Your predicted time to finish a 10.00km race is 53.00 minutes. Keep in mind the tests in Zylabs use pre-programmed input, so you will not see the 5 or the newline generated by hitting the enter key. The same for the 25 and the 10. Page 3 of 4 Sample Output 2: Enter the distance run in your most recent run (in km): 16.09 Enter the time it took to complete the run (in minutes): 112.2 Your speed was 8.60km per hour. Your pace was 418.40 seconds per km. Enter the length of the upcoming race (in km): 12.875 Your predicted time to finish a 12.88km race is 95.17 minutes. Your program must work for any valid values entered by the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!