Saving Time
This is a great little problem from CodeGolf. You must write a program which take an time input for example 23:00 or 07:40 and prints a console clock face to the screen. The rules are:
- Each hour mark should be drawn with ‘o’ (Lower-case O).
- The hour mark representing the hour given in the input should be drawn with an ‘h’.
- The hour mark representing the minute given in the input should be drawn with an ‘m’.
- If the hour and the minute both fall on the same mark, then you should draw it with an ‘x’.
- You should round down the minutes past the hour to the nearest 5 for the purposes of marking it on the clock (so 23 becomes 20, 39 becomes 35).