Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdio.h>
- int main(void){
- int x,sec,min,hour;
- printf("Enter seconds: ");
- scanf("%i",&x);
- sec = x%60;
- min = ((x-sec)/60)%60;
- hour = ((((x-sec)/60)-min)/60)%60;
- printf("%i hour(s) %i minute(s), and %i second(s)", hour, min, sec);
- return 0;
- }
Add Comment
Please, Sign In to add comment