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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started