Problem Description
Kamalesh wish to know how the time is converted from seconds to hours, minutes and seconds. Your task is to write C program for this conversion.CODING ARENA::
#include <stdio.h>
int main()
{
int a,h,m,s;
scanf("%d",&a);
m=a/60;
s=a%60;
h=m/60;
m=m%60;
printf ("%d %d %d",h,m,s);
return 0;
}
Test Case 1
Input (stdin)7302
Expected Output2 1 42
Test Case 2
Input (stdin)652
Expected Output0 10 52
No comments:
Post a Comment