PROGRAM IN "C" Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Input Format A single...


PROGRAM IN "C"


Given a time in 12-hour AM/PM format, convert it to military (24-hour) time.



Note:
Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock.



Input Format


A single string containing a time in 12-hour clock format (i.e.:hh:mm:ssAM or hh:mm:ssPM )



Output Format


Convert and print the given time in 24-hour format, where 00



Sample Input


07:05:45PM


Sample Output


19:05:45

>>>>>>>>>>>>>>>>>>>>>>>>>>C program>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


char* timeConversion(char* s) { // Complete this function }


int main() { char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s", s); int result_size; char* result = timeConversion(s); printf("%s\n", result); return 0; }



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here