IvoSilva

[PROG1] Ficha 3 | Exercício 7

Nov 20th, 2011
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. int main ()
  3. {
  4.   int year ;
  5.   printf ("Indique o ano: ") ;
  6.   scanf ("%d" , &year) ;
  7.   if (year % 4 == 0 && (year % 400 == 0 || year % 100 != 0)) printf ("O ano é bissexto.\n") ;
  8.   else printf ("O ano não é bissexto.\n") ;
  9.   return 0 ;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment