foo.c: In function 'main':
foo.c:7:9: error: expected ',' or ';' before 'int'
7 | int num[10],maxheight;
| ^~~
foo.c:9:29: error: 'num' undeclared (first use in this function)
9 | scanf("%d",&num[i]);
| ^~~
foo.c:9:29: note: each undeclared identifier is reported only once for each function it appears in
foo.c:11:21: error: 'maxheight' undeclared (first use in this function)
11 | scanf("%d",&maxheight);
| ^~~~~~~~~
foo.c:14:28: error: expected ';' before '}' token
14 | n++
| ^
| ;
15 | }
| ~
[Hydro](https://hydro.ac)提供评测服务