记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:3:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
 int a int b;
       ^~~
/in/foo.c:4:7: error: expected expression before '%' token
 scanf(%d,%d,&a,&b);
       ^
/in/foo.c:5:5: error: 'a' undeclared (first use in this function)
 if (a>b);
     ^
/in/foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:9:13: error: expected identifier or '(' before 'int'
 for(int i=a,int j=b int o=0;a<=b;o==o+a,o++)
             ^~~
/in/foo.c:9:34: error: 'o' undeclared (first use in this function)
 for(int i=a,int j=b int o=0;a<=b;o==o+a,o++)
                                  ^
/in/foo.c:9:40: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 for(int i=a,int j=b int o=0;a<=b;o==o+a,o++)
                                        ^
/in/foo.c:10:1: error: expected expression before 'else'
 else for(int i=a,int j=b int o=0;a<=b;o==o+a,o++)
 ^~~~
/in/foo.c:9:9: warning: unused variable 'i' [-Wunused-variable]
 for(int i=a,int j=b int o=0;a<=b;o==o+a,o++)
         ^

信息

递交者
类型
自测
题目
A2-1 循环结构入门:数列求和
语言
C
递交时间
2023-09-25 10:32:57
评测时间
2023-09-25 10:32:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes