1 #include<stdio.h> 2 int main(){ 3 int t; 4 scanf("%d",&t); 5 int h = t/3600; 6 int m = (t - h*3600)/60; 7 int s = t-h*3600-m*60; 8 printf("%d:%d:%d",h,m,s); 9 }
C语言 · 时间转换
原文:http://www.cnblogs.com/panweiwei/p/6238174.html