Txerrinko

Año bisiesto

Jul 26th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.    unsigned int anyo;
  7.  
  8.  
  9.   printf("Teclea el ano \n");
  10.   scanf("%d", &anyo);
  11.  
  12.   if ( ( anyo % 4 == 0 && anyo % 100 != 0 ) || ( anyo % 400 == 0 ) )
  13.   {
  14.      printf("Es bisiesto. ");
  15. }
  16.    else
  17.    {
  18.      printf("No es bisiesto ");
  19.      }
  20.      
  21.  
  22.  
  23.  
  24.  
  25.   system("PAUSE"); 
  26.   return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment