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
Sample Output
>>>>>>>>>>>>>>>>>>>>>>>>>>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; }
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here