x= 3600a + 60b + c ( a hr x 3600 sec / hr ) + ( b min x 60 sec / min ) + c sec = x sec
1 hour = 60 x 60 = 3600 sec 5 hours = 5 x 3600 = 18000 sec 30 min = 1800 sec Therefore 5 hours and 30 minutes = 18000 + 1800 = 19800 sec
20 min=1,200 sec 6 hours=21,600 sec 6 hours and 20 minutes=22,800
1 min = 60 sec 30 min = 1800 sec
1 min = 60 sec 6 min = 6 x 60 = 360 sec
x= 3600a + 60b + c ( a hr x 3600 sec / hr ) + ( b min x 60 sec / min ) + c sec = x sec
1 hour = 60 x 60 = 3600 sec 5 hours = 5 x 3600 = 18000 sec 30 min = 1800 sec Therefore 5 hours and 30 minutes = 18000 + 1800 = 19800 sec
2 hour = 3600 sec 5 min = 300 sec total sec in 2hr&5min= 3900
main() { int sec=00,min=00,hr=00; printf("Enter time in seconds"); scanf("%d",&sec); if (sec<60) printf("%d :%d : %d",hr,min,sec); else if(sec>=60) min=int(sec/60); sec=int(sec%60); printf("%d: %d : %d",hr,min,sec); else if (sec>=3600) min=int(sec/60); sec=int(sec/60) hr=int(min/60); printf("%d : %d : %d",hr,sec,min); }
60 seconds = 1 minute → 5 min 8 sec = 5 8/60 min = 5 + (8 ÷ 60) min ≈ 5.133 min
2310 sec * 1 min/60 sec * 1 hr/60 min is 0.642 hr.
0 hours 9 min 58 sec
20 min=1,200 sec 6 hours=21,600 sec 6 hours and 20 minutes=22,800
32 min 9 sec 40 min 10 sec adding gives... 71 min 19 sec 1 hr 11 min 19 sec. ■
1 min = 60 sec 30 min = 1800 sec
1 min = 60 sec Hence 1 sec = 1/60 min
1 min = 60 sec 6 min = 6 x 60 = 360 sec