Question: PART 1: Write a program, raceTimes.c, that starts by asking the user to enter the time a race starts. Print the following message: Enter the

PART 1: Write a program, raceTimes.c, that starts by asking the user to enter the time a race starts. Print the following message: Enter the start time (hr:min): Assume the user enters 1:12, this is what the screen should look like: ( means hitting the enter key) Enter the start time (hr:min): 1:12 Read the time as an integer for the hour and an integer for the minute and store it in fractional hours as a double . You can combine the two numbers using the formula: time = hour + (minute / 60.0) You will then read the finish time and print out the elapsed time for the race by subtracting the times and converting the fractional time back to hours and minutes.

PART 2: Edit and upgrade raceTimes.c so that it can handle a race with 3 laps, where it prints the times for each lap and finally, the times for the entire race.

Execution and Output Example:

Enter the start time (hr:min): 1:10

Enter the time for lap 1 (hr:min): 1:42

Enter the time for lap 2 (hr:min): 2:12

Enter the time for lap 3 (hr:min) :2:50

Lap Start Finish Elapsed

1 1:10 1:42 0:32

2 1:42 2:12 0:30

3 2:12 2:50 0:38

ALL 1:10 2:50 1:40

I have finished part 1 and 2 but I need help with how to excecute the table with the start, finish, and elapsed times on C program.

PART 1: Write a program, raceTimes.c, that starts by asking the user

Part II (AT-HOME 40%) Edit and upgrade raceTimeb.c so that it can handle a race each lap and finally, the times for the entire race. Execution and Output Example: Enter the start time (hr:min): 1:10 Enter the time for lap 1 (hr:min): 1:42 Enter the time for lap 2 (hr:min): 2:12 Enter the time for lap 3 (hr:min): 2:50 Lap Start Finish Elapsed 0132 0:30 212 2:50 8:38 1510 2:50 1240 3 ALL

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!