#include<stdio.h> main() { int number,lay1,lay2,lay3; number=getchar(); putchar(number);
lay1=number%4; lay2=number%100; lay3=number%400;
if (lay1==0) {if(lay2==0)
{if(lay3==0) printf("This year is a leap year!"); else printf("This year is not a leap year!"); } else ; } else printf("This year is not a leap year!"); }
再后来改成这样了,编译成功了,可是却没有办法显示了。
----------------解决方案--------------------------------------------------------
我觉得楼主还是去看看
标识符.和基本的程序数据类型吧
----------------解决方案--------------------------------------------------------