foo.c: In function 'main':
foo.c:8:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
8 | scanf("%d\n",x);
| ~^ ~
| | |
| | int
| int *
foo.c:9:25: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~~~~~~~~
foo.c:9:37: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~~~~~~~~~
foo.c:9:50: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~~~~~~~~~~
foo.c:9:64: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~~~~~~~~~~~
foo.c:9:79: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~~~~~~~~~~~~
foo.c:9:95: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ~^~~
foo.c:9:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
9 | while(y/1%10*2^0+y/10%10*2^1+y/100%10*2^2+y/1000%10*2^3+y/10000%10*2^4+y/100000%10*2^5!=x);
| ^~~~~
foo.c:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
10 | {
| ^
foo.c:13:23: error: expected ';' before '}' token
13 | printf("%d",y)
| ^
| ;
14 | }
| ~
[Hydro](https://hydro.ac)提供评测服务