#include <stdio.h>
#include <stdlib.h>
main()
{
int ch;
printf("Please enter a year");
scanf("%d",&ch);
if(ch%100!=0)
if(ch%4==0)
printf("%d is a leap year\n",ch);
else
printf("%d is not a leap year\n",ch);
else
printf("%d is a leap year\n",ch);
getch();
}
我用C写的
编译了 可以用