Can you help me to solve this ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you help me to solve this ?

You want to convert the time from a 12 hour clock to a 24 hour clock. If you are given the time on a 12 hour clock, you should output the time as it would appear on a 24 hour clock. Task: Determine if the time you are given is AM or PM, then convert that value to the way that it would appear on a 24 hour clock. Input Format: A string that includes the time, then a space and the indicator for AM or PM. Output Format: A string that includes the time in a 24 hour format (XX:XX)

17th May 2020, 2:52 AM
Kartik Singh
Kartik Singh - avatar
2 Answers
+ 2
Your attempt??
17th May 2020, 2:53 AM
Arsenic
Arsenic - avatar
+ 1
Thanks
17th May 2020, 3:14 AM
Kartik Singh
Kartik Singh - avatar