5.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 program then outputs what the time will be after the waiting period. Use 24-hour notation for the times. Include a loop that lets the user repeat this calculation for additional input values 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 types a y or a Y to signify "continue" with any other character 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 output is printed "Completion time is in the day following the start time" (see the example below). EXAMPLE: Note that single digit input and output for both hours and minutes is accepted. Compute completion time from current time and waiting period Current time: Enter 24 hour time in the format HH:MM 22:3 Waiting time: Enter 24 hour time in the format HH:MM 05:4 Completion time is in the day following the start time Completion Time in 24 hour format: 3:7 Enter Y or y to continue, any other halts y Current time: Enter 24 hour time in the format HH:MM 9:00 Waiting time: Enter 24 hour time in the format HH:MM 8:00 Completion Time in 24 hour format: 17:0 Enter Y or y to continue, any other halts

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PLEASE HELP! I am looking for the code that is specifically for MyprogrammingLab C++ 5.2 Time Project, or a code that uses a void function with only #include<iostream>

5.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 program then outputs what the time will be after the waiting period. Use 24-hour notation for the times. Include a loop that lets the user repeat this calculation for additional input values 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 types a y  or a Y  to signify "continue" with any other character 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 output is printed "Completion time is in the day following the start time" (see the example below).

EXAMPLE: Note that single digit input and output for both hours and minutes is accepted. Compute completion time from current time and waiting period
Current time:
Enter 24 hour time in the format HH:MM
22:3
Waiting time:
Enter 24 hour time in the format HH:MM
05:4
Completion time is in the day following the start time
Completion Time in 24 hour format:
3:7


Enter Y or y to continue, any other halts

y
Current time:
Enter 24 hour time in the format HH:MM
9:00
Waiting time:
Enter 24 hour time in the format HH:MM
8:00
Completion Time in 24 hour format:
17:0


Enter Y or y to continue, any other halts

O PREV NEXTO
Workbench
Lab
Pearson | MyLab | Programming
Exercise 70413 e
deadline: 04/10/2022 11:59 PM
freezes on: 04/21/2022 12:59 AM
WORK AREA
powered by turingscraft
EXAMPLE: Note that single digit input and output for both hours and minutes is
accepted. Compute completion time from current time and waiting period
Table of Contents
Current time:
prev |Search the TOC.
next
Enter 24 hour time in the format HH:MM
22:3
Waiting time:
vE Problem Solving With C++, 10th Ed.
Enter 24 hour time in the format HH:MM
+ Codelab Warmup
05:4
Completion time is in the day following the start time
Completion Time in 24 hour format:
+ CHAPTER 1 Introduction to Computers and
+ CHAPTER 2 C++ Basics
+ CHAPTER 2 Programming Project(s)
+ CHAPTER 3 More Flow of Control
+ CHAPTER 3 Programming Project(s)
+ CHAPTER 4 Procedural Abstraction and Fur
+ CHAPTER 4 Programming Project(s)
vA CHAPTER 5 Functions for All Subtasks
E 5.1 void FUNCTIONS
+ Definitions of void Functions
3:7
Enter Y or y to continue, any other halts
Current time:
Enter 24 hour time in the format HH:MM
9:00
Programming Example: Converting
+ return Statements in void Functions
Waiting time:
Enter 24 hour time in the format HH:MM
8:00
+ 5.2 CALL-BY-REFERENCE PARAMETE
+ 5.3 USING PROCEDURAL ABSTRACT
+ 5.4 TESTING AND DEBUGGING FUNC
+ 5.5 GENERAL DEBUGGING TECHNIQ
Completion Time in 24 hour format:
17:0
vA CHAPTER 5 Programming Project(s)
vO Programming Projects
e 70413
Enter Y or y to continue, any other halts
+ CHAPTER 6 I/O Streams as an Introduction
+ CHAPTER 6 Programming Project(s)
+ CHAPTER 7 Arrays
|1 of 1: Mon Apr 11 2022 14:05:08 GMT-0400 (Eastern Daylight Time) V
SUBMIT
+ Chapter 7 Project(s)
1 Type your solution here...
II
Transcribed Image Text:O PREV NEXTO Workbench Lab Pearson | MyLab | Programming Exercise 70413 e deadline: 04/10/2022 11:59 PM freezes on: 04/21/2022 12:59 AM WORK AREA powered by turingscraft EXAMPLE: Note that single digit input and output for both hours and minutes is accepted. Compute completion time from current time and waiting period Table of Contents Current time: prev |Search the TOC. next Enter 24 hour time in the format HH:MM 22:3 Waiting time: vE Problem Solving With C++, 10th Ed. Enter 24 hour time in the format HH:MM + Codelab Warmup 05:4 Completion time is in the day following the start time Completion Time in 24 hour format: + CHAPTER 1 Introduction to Computers and + CHAPTER 2 C++ Basics + CHAPTER 2 Programming Project(s) + CHAPTER 3 More Flow of Control + CHAPTER 3 Programming Project(s) + CHAPTER 4 Procedural Abstraction and Fur + CHAPTER 4 Programming Project(s) vA CHAPTER 5 Functions for All Subtasks E 5.1 void FUNCTIONS + Definitions of void Functions 3:7 Enter Y or y to continue, any other halts Current time: Enter 24 hour time in the format HH:MM 9:00 Programming Example: Converting + return Statements in void Functions Waiting time: Enter 24 hour time in the format HH:MM 8:00 + 5.2 CALL-BY-REFERENCE PARAMETE + 5.3 USING PROCEDURAL ABSTRACT + 5.4 TESTING AND DEBUGGING FUNC + 5.5 GENERAL DEBUGGING TECHNIQ Completion Time in 24 hour format: 17:0 vA CHAPTER 5 Programming Project(s) vO Programming Projects e 70413 Enter Y or y to continue, any other halts + CHAPTER 6 I/O Streams as an Introduction + CHAPTER 6 Programming Project(s) + CHAPTER 7 Arrays |1 of 1: Mon Apr 11 2022 14:05:08 GMT-0400 (Eastern Daylight Time) V SUBMIT + Chapter 7 Project(s) 1 Type your solution here... II
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education