Question: (C++) these programs should be written in C++ code. there are two problems A and B. Problem A: Clocks forward (20 points) Ask the user

(C++) these programs should be written in C++ code. there are two problems A and B.

(C++) these programs should be written in C++ code. there are two

problems A and B. Problem A: Clocks forward (20 points) Ask the

Problem A: Clocks forward (20 points) Ask the user to enter three inputs: the time in hours, the time in minutes and whether it is AM or PM Then ask the user for a second number and move the clock a certain amount of minutes forwards. After this, print out the new time (in AM/PM format). You can assume that the initial time is well formatted. in other words the hours will be between 1 and 12, and the minutes will be between 0 to 59. The last will always be either A' or 'P' (in upper case). However, when choosing how many minutes to move the clock forward, it can be any (positive) whole number. Note: Noon is more commonly considered 12:00pm and midnight is 12:00am. Since it is a hassle to get well formatted numbers, you do not need to make the minutes time always be two digits. So in the example shown, please have it say 12:2 instead of 12:02. (This is to make your lives easier.) Example 1 (user input is underlined) Enter the current time: 11 23 A 39 New time: 12:2 PM Example 2 (user input is underlined): Enter the current time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!