记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:17: error: expected ',' or ';' before 'printf'
    6 |                 printf("请输入一个正整数:");
      |                 ^~~~~~
foo.c:8:15: error: 'n' undeclared (first use in this function)
    8 |         int b[n];
      |               ^
foo.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
foo.c:10:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   10 |         for(i=0;a!=0;i++);
      |         ^~~
foo.c:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   11 |         {
      |         ^
foo.c:12:9: error: 'c' undeclared (first use in this function)
   12 |         c[i]=a%2;
      |         ^
foo.c:17:17: error: expected ';' before '}' token
   17 |         return 0
      |                 ^
      |                 ;
   18 | }
      | ~                
foo.c:8:13: warning: unused variable 'b' [-Wunused-variable]
    8 |         int b[n];
      |             ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1080 xf1-3进制转换1
比赛
2023 程序设计与竞赛(作业1:见面赛)
语言
C
递交时间
2023-09-16 13:02:08
评测时间
2023-09-16 13:02:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes