C-study/02-1/4/4.c
2021-09-29 15:15:39 +08:00

15 lines
242 B
C

#include<stdio.h>
int main()
{
int a,h=0,m=0,s=0;
printf("Please input time in seconds:");
scanf("%d",&a);
h = a / 3600;
a = a % 3600;
m = a / 60;
s = a % 60;
printf("\nHours: %d\nMinutes: %d\nSeconds: %d",h,m,s);
return 0;
}