记录详情

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=0,b=0,c=0;
      |  ^~~~
      |  int
foo.c:3:2: note: each undeclared identifier is reported only once for each function it appears in
foo.c:3:9: error: 'b' undeclared (first use in this function)
    3 | {inta=0,b=0,c=0;
      |         ^
foo.c:3:8: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    3 | {inta=0,b=0,c=0;
      |        ^
foo.c:3:13: error: 'c' undeclared (first use in this function)
    3 | {inta=0,b=0,c=0;
      |             ^
foo.c:3:12: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    3 | {inta=0,b=0,c=0;
      |            ^
foo.c:4:2: warning: implicit declaration of function 'sanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |  sanf("%d%d%d",&a,&b,&c);
      |  ^~~~
      |  scanf
foo.c:4:17: error: 'a' undeclared (first use in this function)
    4 |  sanf("%d%d%d",&a,&b,&c);
      |                 ^
foo.c:8:2: error: 'else' without a previous 'if'
    8 |  else a=a+b;
      |  ^~~~
foo.c:14:2: error: 'else' without a previous 'if'
   14 |  else a=a+c;
      |  ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A1-2 分支结构练习:三数的特征值
语言
C
递交时间
2023-09-26 14:47:55
评测时间
2023-09-26 14:47:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes