fork download
  1. int main()
  2. {
  3. int S;
  4.  
  5. S = 2800;
  6.  
  7.  
  8. int h = S / (60 * 60);//hは時間
  9.  
  10.  
  11. int m = (S % (60 * 60)) / 60;//mは分
  12.  
  13.  
  14. int s = (S % (60 * 60)) % 60;//sは秒
  15.  
  16.  
  17. printf("%d:%d:%d\n", h, m, s);
  18. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
0:46:40