记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:3: error: case label does not reduce to an integer constant
  {case (x>10000&&x<=100000):k=3;printf("%d",k);break;
   ^~~~
/in/foo.c:9:3: error: case label does not reduce to an integer constant
   case (x>1000&&x<10000):k=4;printf("%d",k);break;
   ^~~~
/in/foo.c:10:2: error: case label does not reduce to an integer constant
  case (x>100&&x<1000):k=5;printf("%d",k);break;
  ^~~~
/in/foo.c:11:2: error: case label does not reduce to an integer constant
  case (x>10&&x<100):k=6;printf("%d",k);break;
  ^~~~
/in/foo.c:12:2: error: case label does not reduce to an integer constant
  case (x>=1&&x<10):k=6;printf("%d",k);break;
  ^~~~
/in/foo.c:13:2: error: case label does not reduce to an integer constant
  case (x=10000):k=1;printf("%d",k);break;
  ^~~~
/in/foo.c:14:2: error: case label does not reduce to an integer constant
  case (x=1000):k=2;printf("%d",k);break;
  ^~~~
/in/foo.c:15:2: error: case label does not reduce to an integer constant
  case (x=100):k=3;printf("%d",k);break;
  ^~~~
/in/foo.c:16:2: error: case label does not reduce to an integer constant
  case (x=10):k=4;printf("%d",k);break;
  ^~~~

信息

递交者
类型
递交
题目
1 猜数游戏的最少次数
比赛
小兰赛 2018/12/2
语言
C
递交时间
2018-12-02 11:39:51
评测时间
2018-12-02 11:39:51
评测机
分数
0
总耗时
15ms
峰值内存
2.922 MiB