Advertisement
Guest User

Untitled

a guest
May 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. void main(){
  7. int time;
  8. cout << "Time in seconds - ";
  9. cin >> time;
  10. int hh = 0, mm = 0, ss = 0, temp = time;
  11. hh = temp / 3600;
  12. time = time - hh * 3600;
  13. temp = time;
  14. mm = temp / 60;
  15. ss = temp % 60;
  16. cout << hh << ":" << mm << ":" << ss << endl;
  17. system("pause");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement