IvoSilva

[PROG1] Ficha 2 | Exercício 3

Nov 20th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.   int segs ;
  5.   printf ("Quantos segundos ? ");
  6.   scanf ("%d",&segs);
  7.   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)));
  8.   return 0 ;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment