Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int segs ;
- printf ("Quantos segundos ? ");
- scanf ("%d",&segs);
- printf ("%d segundos correspondem a %d dia(s), %d hora(s), %d minuto(s) e %d segundo(s).\n" , segs , segs / (24 * 60 * 60) , (segs % (24 * 60 * 60)) / (60 * 60) , ((segs % (24 * 60 * 60)) % (60 * 60) / 60) , (((segs % (24 * 60 * 60)) % (60 * 60) % 60)));
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment