Powered By Blogger

29 mar 2012

PROGRAMA QUE TE DICE DSI EL AÑO DE TU NACIMIENTO ES BICIESTO O NO!!
(DEV C++)
 

#include"stdio.h"
#include"conio.h"
main()
{
      char nombre[40];
      int an;
      printf("nombre: ");
      gets(nombre);
      printf("en que año naciste:   ");
      scanf("%i",&an);
      if ((an%4==0)&&((an%100!=0)||(an%400==0)))
      printf("el año %i  es bisiesto ",an);
      else
      printf("el año %i no es bisiesto",an);
      getch();
      }

No hay comentarios:

Publicar un comentario