#include <stdio.h>
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if((year%4 == 0 && year%100 != 0) || year%400 == 0)
{
printf("%s\n","今年是闰年");
}
else
{
printf("%s\n","今年是平年");
}
return 0;
}
if((year%4 == 0 && year%100 != 0) || year%400 == 0)
这一行前面的(敲成中文的,改成英文的
if((year%4 == 0 && year%100 != 0) || year%400 == 0)
printf("%s\n","今年是闰年"); printf("%s\n","今年是平年");
这2行分号错了,改成英文的
printf("%s\n","今年是闰年"); printf("%s\n","今年是平年");