fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int S,h,m,s;
  6.  
  7. S=50; //秒単位の時間秒単位の時間
  8.  
  9. h=S/3600; //○○時間
  10.  
  11. m=S%3600/60; //○○分
  12.  
  13. s=S%3600%60; //○○秒 
  14.  
  15. printf("%d秒は%d:%d:%d",S,h,m,s);
  16.  
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
50秒は0:0:50