郁闷呀!大家帮我看看的的小程序错哪了?
大家帮我看看的写的这个程序为什么显示不出来“分”和“秒”,只能显示“小时”?
#include <stdio.h>
#define SECS_PER_HOUR 3600
#define SECS_PER_MIN 60
unsigned seconds ,minutes,hours,secs_left,mins_left;
main()
{
printf("Enter number of seconds (<65000):");
scanf("%d",&seconds);
hours=seconds/SECS_PER_HOUR;
minutes=seconds/SECS_PER_MIN;
secs_left=seconds%SECS_PER_MIN;
mins_left=minutes%SECS_PER_MIN;
printf("%u second is equal to",seconds);
printf("%u hour ,minute,and second\n",hours,mins_left,secs_left);
return 0;
}
就是上面的程序,让我郁闷了很长时间呢!
不知道错在哪,只能显示小时,我是自学的C语言,还请大家多帮忙!