Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n;
- while(cin>>n)
- {
- int hour=0;
- int minutes=0;
- int seconds=0;
- hour= n/3600;
- n= n- (hour*3600);
- minutes= n/60;
- seconds= n%60;
- cout<<hour<<":"<<minutes<<":"<<seconds<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement