← All problemsSign in

Convert the Time

Given the time in numerals we may convert it into words, as shown below: 5:00 -> five o' clock 5:01 -> one minute past five 5:10 -> ten minutes past five 5:30 -> half past five 5:40 -> twenty minutes to six 5:45 -> quarter to six 5:47 -> thirteen minutes to six 5:28 -> twenty eight minutes past five Write a program which prints the time in words for the input given in the format mentioned

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start