CPSC 120 Postlab 2: Finding Your Pace
Due Before Class on Friday September 16

Overview

For runners, race distances are often given in kilometers -- 5K, 10K, etc. A fast runner might run a 5K race in 20 minutes or so; the winning time is usually closer to 15 minutes, and most of the population comes in between 20 and 35 minutes. Runners in the US, however, typically measure their pace in minutes per mile. In this assignment you will write a program that relates the user's race time to their speed in minutes per mile.

Your program should ask the user for the following input:

Your program should print the user's pace in minutes per mile, then ask the user what pace he or she is trying to achieve. After reading in this information, the program should print what time the user would need to run a race of the given distance in to achieve this pace.

A sample run of your program for a user who ran a 5K in 27 minutes and 15 seconds might look like this (items in bold are entered by the user):

 
Enter the number of kilometers run: 5 
Enter the minutes part of your time: 27 
Enter the seconds part of your time: 15 

Your pace is 8.72 minutes per mile.
How fast do you want to go, in minutes per mile? 6.0 
To go that fast, you would have to run
5 kilometers in 18 minutes and 45 seconds.

Planning Your Program

Be sure to put your name, the file name, and a description of the program in the header.

Submission

To submit your code, upload a zip file containing your code to the course Inquire site.