+ 1
Military time problem solving in two way. Can any one tell me when output will be different.
3 Respuestas
+ 3
For 1:15 AM it outputs 01:015 which should be 01:15 ,
For 12:25 AM it outputs 12:25 which should be 00:25
For 12:45 PM it outputs 24:25 instead it should be 12:45 instead
+ 2
For reliable time converter you would need to rewrite the whole code with better practices.
As to my knowledge the 1 hidden test that fail could be either "12:00 PM" or "12:00 AM" Output==> 12:00 and 00:00 respectively. Therefore, you can add extra if/else condition mentioning these two.
- 1
Abhay Is it possible to implement this code with replace method