Can somebody solve/write this code for me??? I will need the answer to this for a reference for the other 9 problems...
(a) Write a function named time () that has an integer parameter named seconds and three integer reference parameters named hours, min, and sec. The function is to convert the number of seconds passed to it from the main program into an equivalent number of hours, minutes and seconds.
(b) Write a program that inputs an integer number for seconds, calls the function, and displays the equivalent number of hours, minutes, and seconds.
cout << "Enter the time in seconds: " ;
cin >> secnds;
time(secnds, &hrs, &min, &sec);
cout << "The time changed in hour is => ";
cout << hrs << " : " << min << " : " << sec;
cout << endl;
cout << endl;
cout << "The number of hours is: " << hrs;
cout << endl;
cout << "The number of minutes is: " << min;
cout << endl;
cout << "The number of seconds is: " << sec << "\n";
return 0;
}
void time(int secnds, int *hrs, int *min, int *sec)
{
int mod1, mod2;