閏年這一節(jié)是不是有問題?
#include?<stdio.h> int?main()? { ????int?year?=?2014;?//今年是2014年 ????//補(bǔ)全一下代碼 ????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
?一部分
怎么回事?
2017-09-03
6行應(yīng)該是 if(year%4==0)
2017-09-03
第6行應(yīng)該是 if(year%4==0)