foo.c: In function 'main':
foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
6 | scanf("%d\n",x);
| ~^ ~
| | |
| | int
| int *
foo.c:12:19: error: invalid suffix "x" on integer constant
12 | x=3x+1;
| ^~
foo.c:13:13: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
13 | cnt+=1;}
| ^~~
| int
foo.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
[Hydro](https://hydro.ac)提供评测服务