Using a 24-hour clock representation, time is generally expressed in terms of ho
ID: 3652532 • Letter: U
Question
Using a 24-hour clock representation, time is generally expressed in terms of hours and minutes past midnight of the current day. Write a C++ function named addTime() that will add an integer number to a time-of-day value represented by two separate integers: hours and minutes.- Write a definition for addTime() that will accept three integer arguments: the current time hours value, current time minutes value, and the number of minutes to be added to the current time.
- Write a main() driver program that prompts the user to enter the hours and minutes values for the time of day and also number of minutes to add to the time value.
- Have the main () function call addTime() and display the updated time value on the console in the following format: hh:mm.
Explanation / Answer
#include#include void addTime(int *,int *,int *); void display(int *,int *); void main() { int hour,min,addmin; couthour; coutmin; coutaddmin; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.