fork(1) download
  1. #include <iostream>
  2. #include <sstream>
  3. using namespace std;
  4.  
  5. int main() {
  6. int seconds=213213;
  7. int hours = seconds / 3600;
  8. int minutes = (seconds % 3600) / 60;
  9. int t1 = seconds % 60;
  10. int secs = t1 % 60;
  11. string s = to_string(hours);
  12. s+=":";
  13. s+=to_string(minutes);
  14. s+=":";
  15. s+=to_string(secs);
  16. cout<<s;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
59:13:33