记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:5:21: error: 'b' undeclared (first use in this function)
  scanf("%d""%d",&a,&b,&n);
                     ^
/in/foo.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:7:3: error: expected ',' or ';' before 'for'
   for(int i=1;i<=n,i++)
   ^~~
/in/foo.c:7:15: error: 'i' undeclared (first use in this function)
   for(int i=1;i<=n,i++)
               ^
/in/foo.c:7:19: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   for(int i=1;i<=n,i++)
                   ^
/in/foo.c:7:23: error: expected ';' before ')' token
   for(int i=1;i<=n,i++)
                       ^
/in/foo.c:7:23: error: expected statement before ')' token
/in/foo.c: At top level:
/in/foo.c:10:11: error: expected declaration specifiers or '...' before string constant
    printf("%d\n",sum);
           ^~~~~~
/in/foo.c:10:18: error: unknown type name 'sum'
    printf("%d\n",sum);
                  ^~~
/in/foo.c:11:2: error: expected identifier or '(' before 'return'
  return 0; }
  ^~~~~~
/in/foo.c:11:12: error: expected identifier or '(' before '}' token
  return 0; }
            ^

信息

递交者
类型
自测
语言
C
递交时间
2024-11-23 09:10:34
评测时间
2024-11-23 09:10:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes