CPSC 120 Postlab 2: Finding Your Pace
Due before class on Friday September 17th

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. It's interesting to think of what these times translate to in miles per hour (MPH). In this assignment you will write a program that relates the user's race time to their speed in MPH.

Your program should ask the user for the following input:

Your program should print the user's pace in MPH, 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 6.8807339449541285 MPH.
How fast do you want to go, in MPH? 10.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, copy a tar file containing your code to the directory:

   /home/staff/bouchard/CPSC120/post2