Guest User

Untitled

a guest
Jan 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <math.h>
  2. #include <stdio.h>
  3.  
  4. int main(void){
  5. int x,sec,min,hour;
  6. printf("Enter seconds: ");
  7. scanf("%i",&x);
  8. sec = x%60;
  9. min = ((x-sec)/60)%60;
  10. hour = ((((x-sec)/60)-min)/60)%60;
  11. printf("%i hour(s) %i minute(s), and %i second(s)", hour, min, sec);
  12. return 0;
  13. }
Add Comment
Please, Sign In to add comment