Next, x integers are stored in this array (where x is no larger than 50). The array is to be passed to a function sum which is to add up the x integers stored in the array. What should you be passing to the function sum?
Feel free to use the window below to try out some code. Be sure to work the correct answer out "by hand" first before verifying your answer using the code window.
Compile and run the code below in your own C environment.
#include <stdio.h>
/* Here is your prototype. */
void minutesToHoursMinutes(int totalMinutes, int *hours, int *minutes);
int main(void) {
int totalTime, newHours, newMinutes;
totalTime = 0;
printf("Enter total minutes to convert: ");
scanf("%d", &totalTime);
minutesToHoursMinutes(totalTime, &newHours, &newMinutes);
printf("%d minutes equals %d hours and %d minutes.", totalTime, newHours, newMinutes);
return(0);
}
/* Your function goes here. */