Write a c program that asks user to enter a time expressed


1. The following table shows the daily flights from one city to another:

Departure time    Arrival time
8:00 am             10:16 am
9:43 am             11:52 am
11:19 am           1:31 pm
12:47 pm           3:00 pm
2:00 pm             4:08 pm
3:45 pm             5:55 pm
7:00 pm             9:20 pm
9:45 pm            11:58 pm

Write a C program that asks user to enter a time (expressed in hours and minutes, using 24-hour clock). The program then displays the flight schedule whose departure time is closest to that entered by the user:

Enter a 24-hour time: 13:15

Closest departure time is 12:47 p.m, arriving at 3:00 p.m

Requirements for assignment reports

• The cover page must be attached.

• For each programming question, the submission must contain the program itself printed out from the IDE, description of the input and output of the program, and running page (screen shot) which shows that the program works for all cases.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a c program that asks user to enter a time expressed
Reference No:- TGS01275793

Now Priced at $30 (50% Discount)

Recommended (91%)

Rated (4.3/5)