记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:6: error: 'a' undeclared (first use in this function); did you mean 'a1'?
    5 |  for(a>1,a++)
      |      ^
      |      a1
foo.c:5:6: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    5 |  for(a>1,a++)
      |         ^
foo.c:5:13: error: expected ';' before ')' token
    5 |  for(a>1,a++)
      |             ^
      |             ;
foo.c:5:13: error: expected expression before ')' token
foo.c:6:6: error: 'b' undeclared (first use in this function); did you mean 'b1'?
    6 |  for(b>1,b++)
      |      ^
      |      b1
foo.c:6:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    6 |  for(b>1,b++)
      |         ^
foo.c:6:13: error: expected ';' before ')' token
    6 |  for(b>1,b++)
      |             ^
      |             ;
foo.c:6:13: error: expected expression before ')' token
foo.c:7:14: error: 'n' undeclared (first use in this function)
    7 |  scanf("%d",&n);
      |              ^
foo.c:8:12: error: 'b2' undeclared (first use in this function); did you mean 'b1'?
    8 |  sum=b1/a1+b2/a2;
      |            ^~
      |            b1
foo.c:8:15: error: 'a2' undeclared (first use in this function); did you mean 'a1'?
    8 |  sum=b1/a1+b2/a2;
      |               ^~
      |               a1
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A6-2 最大公约数专题:分数的加法
比赛
中北 计算机2021级专业修读指导(3)
语言
C
递交时间
2021-12-16 23:47:39
评测时间
2021-12-16 23:47:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes