/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:26: error: invalid operands to binary & (have 'int *' and 'int')
    6 |         scanf("%d %d",&T &M);
      |                       ~~ ^
      |                       |
      |                       int *
foo.c:11:37: error: invalid operands to binary & (have 'int *' and 'int')
   11 |                 scanf("%d %d",&a[M] &v);
      |                               ~~~~~ ^
      |                               |
      |                               int *
foo.c:15:31: error: expected ')' before '{' token
   15 |                 if(a[i]>a[i+1]
      |                   ~           ^
      |                               )
   16 |                    {
      |                    ~           
foo.c:21:9: error: expected expression before '}' token
   21 |         }
      |         ^
foo.c:28:43: error: 'v' undeclared (first use in this function)
   28 |                                    value+=v;
      |                                           ^
foo.c:28:43: note: each undeclared identifier is reported only once for each function it appears in
foo.c:24:36: warning: variable 'value' set but not used [-Wunused-but-set-variable]
   24 |                            int t=0,value=0;
      |                                    ^~~~~
foo.c:31:32: error: 'value' undeclared (first use in this function)
   31 |                    printf("%d",value);
      |                                ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1104 采药
语言
C
递交时间
2023-11-12 22:04:28
评测时间
2023-11-12 22:04:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes