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",x);
| ~^ ~
| | |
| | int
| int *
foo.c:7:16: warning: right-hand operand of comma expression has no effect [-Wunused-value]
7 | for(i=0,i<=19,i++)
| ^
foo.c:7:26: error: expected ';' before ')' token
7 | for(i=0,i<=19,i++)
| ^
| ;
foo.c:7:26: error: expected expression before ')' token
foo.c:9:20: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
9 | if(x=0)
| ^
foo.c:17:32: error: invalid type argument of unary '*' (have 'int')
17 | k=k+(2**i)*j;
| ^~
[Hydro](https://hydro.ac)提供评测服务