记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1080 xf1-3进制转换1
比赛
2023 程序设计与竞赛(作业1:见面赛)
语言
C
递交时间
2023-09-18 00:07:55
评测时间
2023-09-18 00:07:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes