Question: Write a C++ program that will create a digital clock. The clock should print out a heading for hours, min and sec and should appear
Write a C++ program that will create a digital clock. The clock should print out a heading for hours, min and sec and should appear in the middle of the screen. Arrange the timing of the clock so that the hours, min and sec track as close as possible to a real clock. The clock will work on classical time with distinction of Am and PM. What this means is that the clock displays from 0 hours to 12 noon as AM and then converts to 1 to 12 PM hour time. So the output would look like
HOURS MIN SEC
2 24 47 PM
The program must contain a "while" loop, a "for" loop and "do while" loop. Hint use the "cls" comand , the #include
You will need to use the command system("cls") to clear the screen.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
