Convert totalSeconds to hours, minutes, and seconds, finding the maximum number of hours, then minutes, then seconds.
Ex: If the input is 14465, then the output is:
Hours: 4
Minutes: 1
Seconds: 5
Note: An hour has 3600 seconds. A minute has 60 seconds.
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5 int totalSeconds;
6 int numHours;
7 int numMinutes;
8 int numSeconds;
9
10 cin >> totalSeconds;
11
12 /* Your code goes here */
13
14 cout << "Hours: " << numHours << endl;
15 cout << "Minutes: " << numMinutes << endl;