标签:
#include<stdio.h>
const int CLK_TCK=100;
int main()
{
int c1,c2,x;
scanf("%d%d",&c1,&c2);
x=c2-c1;
if(x%CLK_TCK>=50) //换算成秒,先四舍五入处理【warning】:这里是>=不仅仅>
x=x/CLK_TCK+1;
else
x=x/100;
printf("%02d:%02d:%02d\n",x/3600,x%3600/60,x%60); //时分秒的计算表示
return 0;
}
标签:
原文地址:http://www.cnblogs.com/Evence/p/4292031.html