Time Program in Java
Question : Given a time in the format of hh:mm (12-hour format) 0 < hh <=12, 0 <= mm < 60. The task is to convert it into words as shown:
For Example :-
Input : hr = 5, min = 0
Output : Five O' Clock
Input : hr = 6, min = 24
Output : Twenty Four Minutes Past Six
Terms to Remember :-
6:00 - six o'clock
6:10 - ten minutes past six
6:15 - quarter past six
6:30 - half past six
6:45 - quarter to seven
6:47 - thirteen minutes to seven
Program to convert time into words :-
Checkout Source Code : Click here
Program Video : Watch Now
Kommentarer