-3
在这个简单的程序中查找数字是偶数还是奇怪的是它保持错误Main.c:3:9:error:expected'=',',';','asm'或''属性'{'标记之前。请帮忙。Main.c:3:9:error:expected'=',',',';','asm'或'__attribute__'before'{'token
#include<stdio.h>
int main{
int n;
scanf("%d",&n);
if(n%2==0)
printf("%d is an even number",n);
else
printf("%d is an odd number",n);
return 0;
}
你忘了'main()'后面的'()' – litelite
哦。谢谢!完全忘了 –
@litelite:最好是'(void)';一个空的参数列表是一个过时的功能;不要再使用它了! – Olaf