记录详情

Compile Error

foo.c: In function 'main':
foo.c:3:2: error: 'inta' undeclared (first use in this function); did you mean 'int'?
    3 | {inta,b,s;
      |  ^~~~
      |  int
foo.c:3:2: note: each undeclared identifier is reported only once for each function it appears in
foo.c:3:7: error: 'b' undeclared (first use in this function)
    3 | {inta,b,s;
      |       ^
foo.c:3:6: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    3 | {inta,b,s;
      |      ^
foo.c:3:9: error: 's' undeclared (first use in this function)
    3 | {inta,b,s;
      |         ^
foo.c:3:8: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    3 | {inta,b,s;
      |        ^
foo.c:4:15: error: 'a' undeclared (first use in this function)
    4 |  scanf("%d%d",a,b);
      |               ^
foo.c:5:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    5 |  for(a,b,s=0;a<=b;a++)
      |       ^
foo.c:5:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    5 |  for(a,b,s=0;a<=b;a++)
      |         ^
foo.c:6:8: error: expected ';' before '}' token
    6 |  {s=s+a
      |        ^
      |        ;
......
    9 |  }
      |  ~      
[Hydro](https://hydro.ac)提供评测服务

信息

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