#include #include using namespace std; const int DIVMIN = 60, DIVHR = 3600; void CalcTime(int, int&, int&, int&); int main() { int totsecs, hour, min, sec; cout << "Enter number in seconds: " << endl; cin >> totsecs; CalcTime(totsecs, hour, min, sec); system("pause"); return 0; } void CalcTime(int totsecs, int&hour, int&min, int&sec) { hour = totsecs / DIVHR; totsecs = totsecs % 3600; min = totsecs / DIVMIN; sec = totsecs % 60; cout << "Value for Hour is " << hour << endl; cout << "Value for Minutes is " << min << endl; cout << "Value for Seconds is " << sec << endl; }