fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int S,a,b,c;
  6. scanf("%d",&S);
  7. a = S/3600;//aは時間
  8. b = (S%3600)/60;//bは分
  9. c = (S%3600)%60;//cは秒
  10.  
  11. printf("%d時間%d分%d秒です\n",a,b,c);
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5304KB
stdin
3800
stdout
1時間3分20秒です