View the step-by-step solution to:


I am trying to build two digital clock where one clock is in a 12 hour clock format and the other one is a 24 hour

clock format. Then the user can decide which button to press. If they click yes, then user can decide if they want to add 1 hour, 1 minute, or 1 second to the clock and then display the new clock, if they click no, then the clock will go to the clear screen with just continue adding 1 second to it.

I need to write the code in C++ so that the digital clock will work when the user input something.

This will be coded in c++.

Problem Statement

Chada Tech has domestic and international clients. To meet international standard ISO 8601, Chada Tech wants their clients to be able to view a 12- and a 24-hour clock on their website rather than just the standard 12-hour clock.

Functional Requirements

1. Clock12: Time should be displayed in 12-hour format where the clock does not exceed 12:59:59.

2. Clock24: Time should be displayed in 24-hour format where the clock does not exceed 23:59:59.

3. Both clocks should display on the screen with the current time in the proper format. For example:

4. Your solution should allow the user to exit the program as well as add one hour, minute, or second to both clocks from a user menu as follows:

5. Once a selection is made from the user menu, the program should take action based on that choice. Both clocks must display on the screen simultaneously in the proper format next to each other. Below is a sample of the expected output if the user selects option 3 from the menu:


Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Computer Science tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors