哪里错了啊 求助
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;
}
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;
}
2015-05-29
include <stdio.h>这里缺了#
#include <stdio.h>
printf("%s\n","今年是闰年");
printf("%s\n","今年是平年");
这2行代码最后的分号换成英文状态下的分号就好了。
printf("%s\n","今年是闰年"); printf("%s\n","今年是平年");
修改后的全部代码
#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; }
举报