Question: This question is related to programming C The problem is this: At a recent, pre-pandemic OU track meet, three MAC track stars ran the mile

This question is related to programming C

The problem is this: At a recent, pre-pandemic OU track meet, three MAC track stars ran the mile race. Your program will ask the user to enter their times in minutes and seconds. It will then output their speed in both feet per second and meters per second. For this you are to develop and use three functions:

  1. Takes as arguments both the minutes and seconds and returns the number of seconds it took to run the race. (60 seconds in a minute)
  2. Converts the seconds that it took to run the race into feet per second using the constant, 5280 which is the number of feet in a mile.
  3. Converts the seconds that it took to run the race into meters per second using the constant 1609.34 which is the number of meters in a mile.

The later two should return floating point numbers, meaning that it would be good to use a cast inside the function.

The input values for the three runners will be read, via scanf, from the keyboard, and the functions will be called in the main, with a separate set of calls for each of the three runners. Output of the results in the main, NOT in the functions. Sample output:

Runner 1, who ran in 4 minutes and 28 seconds had a speed of 19.070 feet per second, which is 6.005 meters per second.

Your program should use #define at the top of the program to declare the two constants that are to be used.

Your program should have prototypes for the three functions above the main, with their definitions below.

Once you have your program running run it with these three times

Runner 1: 4 minutes 28 seconds

Runner 2: 5 minutes 7 seconds

Runner 3: 5 minutes 51 seconds

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!