记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:4:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
  scanf ("%d",&x);
  ^~~~~
/in/foo.c:4:2: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:4:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:8:7: error: 'i' undeclared (first use in this function)
  for (i=0;i<x;i++)
       ^
/in/foo.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:13:9: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
   if(max==a[x/2]==a[x/2+1]||max==a[x/2+1])
      ~~~^~~~~~~~
/in/foo.c:14:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   printf("Win");
   ^~~~~~
/in/foo.c:14:3: warning: incompatible implicit declaration of built-in function 'printf'
/in/foo.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:19:3: warning: incompatible implicit declaration of built-in function 'printf'
   printf("Lost");
   ^~~~~~
/in/foo.c:19:3: note: include '<stdio.h>' or provide a declaration of 'printf'

信息

递交者
类型
递交
题目
2 取最大数的博弈游戏
比赛
小兰赛 2018/12/2
语言
C
递交时间
2018-12-02 11:54:47
评测时间
2018-12-02 11:54:47
评测机
分数
0
总耗时
9ms
峰值内存
2.547 MiB