Question: Please give the correct code.please type the code. Please dont give this wrong code. S.2: Time Write a program that requests the current time and

Please give the correct code.please type the code.
 Please give the correct code.please type the code. Please dont give
Please dont give this wrong code.
this wrong code. S.2: Time Write a program that requests the current
time and a waiting time as two integers for the number of
hours and the number of minutes to wait. The prngram then outouts
what the time will be afte the walting period. Use 24-hour notation

S.2: Time Write a program that requests the current time and a waiting time as two integers for the number of hours and the number of minutes to wait. The prngram then outouts what the time will be afte the walting period. Use 24-hour notation for the times. Include a loop that lets the user repeat this calculation for additional input yalues until the user says she or he wants to end the program. Input Notes:Both the current time and the waiting time are entered in the form HH:MM where HH and MM are integers signifying hours and minutes respectively. In response to the continuation prompts (described below) the user tyres a y ora Y to signify "continue" with any other sharacter signifying "quit Output Notes (Prompts and Labels):At the outset the program prints the title "Compute completion time from current time and waiting period". The program then prompts for the current time with the prompt "Current time: followed by the instructions "Enter 24 hour time in the format HH:MM. After reading the current time, the waiting time is read in with the prompt "Waiting time:" and the same instructions. The resulting time is printed after the prompt Completion Time in 24 hour format.:. This is followed by the continuation prompt Enter Y or y to continue, any other halts" If the resulting time goes into the next day, the additional outout is printed "Completion time is in the day following the start time" (see the example below). EXAMPLE: Note that single digit input and osutaut for both hours and minutes is accepted. Compute coepletion time from eurrent tine and vaiting perlod Current tine Enter 24 hour time in the fornat HHM 2213 Waiting tines Enter 24 hoor time in the format HHIMM 05a4 Completlon tine ia in the day following the start tine Completion Tine in 24 hour formats 317 Enter Y or y to ontinue, aay other halt. Enter 24 hour tine in the format .MM 9100 Maiting tiner Enter 24 hour tise in the format MON Completion Tine in 24 hour fornat Enter Y or y to eontinue, any other haite I/Remove this header file if not using visual studio. 3 # include "stdafx.h" 5 //Include the required header files. 7 #1nclude 9 #include domanip> 10 11 using namespace std; 12 13 //Declare the functions. 15 void evaluateTime (int cHrs, int cMin, int wHrs, int wMin, 16 17 int& eHrs, int& eMin) 18 19 void loopIterate() 20 21 //Define the main function. 23 int main() 24 25 ( 26 27 28 29 30 31 32 //Declare the variable. char choice //Display the message. cout choice //check for the condition to countinue in the program. 45 46 48 50 while (choice'y'Il choice'Y') 53 54 system("pause") return 0 56 57 58 59 //Define the function. 60 61 void loopIterate) 62 63 64 65 67 68 69 70 71 72 73 //Define the variables. int currentHours, currentMinutes, waitingHours; int endHours, endMinutes, waitingMinutes, min = 0, hr-0; //Prompt the user to enter the current time. cout > currentHours; cin.get): cin >> currentMinutes //Prompt the user to enter the waiting time. cout > waitingHours: cin.get( cin >> waitingMinutes; //call the function to evaluate the time. evaluateTime (currentHours, currentMinutes, waitingHours, 89 90 92 93 95 96 98 waitingMinutes, endHours, endMinutes) 100 101 102 103 104 105 106 //Dispaly the time after adding the current time and //the waiting time. cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Below is a clean and corrected version of the code in C that meets the requirements specif... View full answer

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!