Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void main(){
- int time;
- cout << "Time in seconds - ";
- cin >> time;
- int hh = 0, mm = 0, ss = 0, temp = time;
- hh = temp / 3600;
- time = time - hh * 3600;
- temp = time;
- mm = temp / 60;
- ss = temp % 60;
- cout << hh << ":" << mm << ":" << ss << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement