请教下为什么报错
#include <stdio.h>#include <stdlib.h>
int main()
{
int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
printf("%d",(a + a) / a))
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
printf("%d",(a + a) / a));
system("pause");
return 0;
}
兄弟,分号啊兄弟,粗心要不得!
> Executing task: E:\MinGW\bin\gcc.exe -g "e:\Administrator\Documents\My C\My C Function\arrcat.c" -o "e:\Administrator\Documents\My C\My C Function\arrcat.exe" <
e:\Administrator\Documents\My C\My C Function\arrcat.c: In function 'main':
e:\Administrator\Documents\My C\My C Function\arrcat.c:6:38: error: expected ';' before ')' token
printf("%d",(a + a) / a))
^
;
e:\Administrator\Documents\My C\My C Function\arrcat.c:6:38: error: expected statement before ')' token
终端进程已终止,退出代码: 1
终端将被任务重用,按任意键关闭。
兄弟记住这个提示,说明你分号忘写了
页:
[1]