+ 4

The time in words

Read two space separated inputs; first as hour and second as minutes. Now, print the time in words. 1. Input: 8 13 Output: thirteen minutes past eight 2. Input : 8 44 Output: sixteen minutes to nine 3. Input: 8 15 Output: quarter past eight 4. Input: 8 30 Output: half pas eight ....and so on. It should work on all inputs. Feel free to use any language.

26th Jan 2018, 5:55 PM
Sujeet Agrahari
Sujeet Agrahari - avatar
2 Respostas
+ 2
https://code.sololearn.com/cBFIt8gU4j2u/?ref=app Needs more testing, is ugly in two ways, but seems to work.
26th Jan 2018, 8:22 PM
BlazingMagpie
BlazingMagpie - avatar
+ 1
12 or 24 hours?
26th Jan 2018, 7:07 PM
BlazingMagpie
BlazingMagpie - avatar