|
|||
12-Hour ClockWrite a program that reads times in 12-hour format from the standard input until end-of-file (EOF), one per line. The program should write to the standard output the 24-hour times corresponding to the given times. If the hours are less than 10, display the hours with one digit. Minutes should always be displayed with two digits. For example, 12.02am should be converted to 0.02, 11.58am to 11.58, 12.32pm to 12.32, 1.29pm to 13.29, and 10.17pm to 22.17. Sample Input
Output for Sample Input
Acknowledgement
This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |