Discuss a time conversion program in c


Discussion:

Time Conversion Program in C

1- inputs a time duration in hours, minutes, and seconds;

2-calculates the equivalent total number of seconds;

3-recalculates the hours, minutes, and seconds from the total;

4-displays the values of the hours, minutes, seconds, and total seconds.

Specific Requirements

1-The program must be otherwise formatted and documented

2-The program should contain a single method, main

3-The program should declare 4 variables, hours, minutes, seconds, and totalSeconds, all of type int. You may declare at most 1 additional variable for temporary usage. No other variable are allowed.

4- The program should declare and use exactly 2 constants, MIN_PER_HR and SEC_PER_MIN (minutes per hour and seconds per minute)

5-The input statement(s) must be preceded by a suitable prompt(s).

6-The output produced by your program should be a single line

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Discuss a time conversion program in c
Reference No:- TGS01936366

Now Priced at $25 (50% Discount)

Recommended (94%)

Rated (4.6/5)