16.8k views
1 vote
There are (at least) two ways in which you can make a 12-hour clock. One possibility is to just store hour values from 1 to 12. On the other hand, you can simply leave the clock to work internally as a 24-hour clock but change the display string of the clock display to show4:23 or 4:23pm when the internal value is 16:23. Implement both versions. Which option is easier? Which is better? Why?

User Blue Skies
by
3.5k points

1 Answer

3 votes

Answer:

The easiest is the 12 valued clock, while the best is the 4:30 or 4:30pm clock.

Step-by-step explanation:

A clock is a device used to tell time. It holds number values representing the hours, minutes and seconds of the day. It can be analog or digital.

An analog clock displays time using pointers identify the hour, minute and second, while a digital clock is an electronic device that displays time on a digital screen.

A 12 hour configuration is mostly found in analog clocks, the pointers points sequentially to the numbers and the minutes and seconds can be read in between consecutive numbers. It is difficult to read the time.

The 4:30 to 4:30pm display gives number values on a display screen, making it easier to tell time.

User RVK
by
3.3k points