Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a void function called TimeAdd that takes parameters representing two time

ID: 3625414 • Letter: W

Question

write a void function called TimeAdd that takes parameters representing two times in days, hours, and minutes, and adds those parameters to get a new time. Each part of the time is an int. Hours range from 0 to 23, while minutes range from 0 to 59. There is no limit on the range of days. we assume that the time to added is positive. The values in the parameters representing the first time are replaced by the result of adding the two times.
Here is an example call in which 3 days, 17 hours, 49 minutes is added to 12 days, 22 hours, and 14 minutes:

days = 12;
hours = 22;
minutes = 14;

TimeAdd (days, hours, minutes, 3, 17, 49)

After the call, the values in the variables are as follow:

days = 16
hours = 16
minutes = 3

Explanation / Answer

//programming language used is C++ #include void TimeAdd(int *d,int *h,int *m,int day,int hour,int min) {int h1,m1,d1; if(*h>23||*h