#include <stdio.h>
int main()
{
int year = 2014; //今年是2014年
//补全一下代码
if(=)
{
printf("%s\n",今年是闰年);
}
else
{
printf("%s\n",今年是平年);
}
return 0;
}试了很多次,怎么提交都是正确的提交之后就是类似与这样
<pre>hello.c: In function 'main': hello.c:6:8: error: expected expression before '=' token if(=) ^ hello.c:8:9: error: stray '\344' in program printf("%s\n",今年是闰年); ^ hello.c:8:9: error: stray '\273' in program hello.c:8:9: error: stray '\212' in program hello.c:8:9: error: stray '\345' in program hello.c:8:9: error: stray '\271' in program hello.c:8:9: error: stray '\264' in program hello.c:8:9: error: stray '\346' in program hello.c:8:9: error: stray '\230' in program hello.c:8:9: error: stray '\257' in program hello.c:8:9: error: stray '\351' in program hello.c:8:9: error: stray '\227' in program hello.c:8:9: error: stray '\260' in program hello.c:8:9: error: stray '\345' in program hello.c:8:9: error: stray '\271' in program hello.c:8:9: error: stray '\264' in program hello.c:12:9: error: stray '\344' in program printf("%s\n",今年是平年); ^ hello.c:12:9: error: stray '\273' in program hello.c:12:9: error: stray '\212' in program hello.c:12:9: error: stray '\345' in program
一部分
怎么回事?
6行应该是 if(year%4==0)
第6行应该是 if(year%4==0)