记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:3: error: expected ';' before 'scanf'
   scanf("%d",&number);
   ^~~~~
foo.c:11:9: error: stray '\357' in program
  if(flag)
         ^
foo.c:11:10: error: stray '\274' in program
  if(flag)
          ^
foo.c:11:11: error: stray '\211' in program
  if(flag)
           ^
foo.c:12:5: error: expected ')' before 'printf'
     printf("%d是素数\n",number);
     ^~~~~~
foo.c:12:34: error: stray '\357' in program
     printf("%d是素数\n",number);
                                  ^
foo.c:12:35: error: stray '\274' in program
     printf("%d是素数\n",number);
                                   ^
foo.c:12:36: error: stray '\211' in program
     printf("%d是素数\n",number);
                                    ^
foo.c:12:37: error: stray '\357' in program
     printf("%d是素数\n",number);
                                     ^
foo.c:12:38: error: stray '\274' in program
     printf("%d是素数\n",number);
                                      ^
foo.c:12:39: error: stray '\233' in program
     printf("%d是素数\n",number);
                                       ^
foo.c:14:12: error: stray '\357' in program
      printf("%d不是素数\n",number);
            ^
foo.c:14:13: error: stray '\274' in program
      printf("%d不是素数\n",number);
             ^
foo.c:14:14: error: stray '\210' in program
      printf("%d不是素数\n",number);
              ^
foo.c:14:40: error: stray '\357' in program
      printf("%d不是素数\n",number);
                                        ^
foo.c:14:41: error: stray '\274' in program
      printf("%d不是素数\n",number);
                                         ^
foo.c:14:42: error: stray '\211' in program
      printf("%d不是素数\n",number);
                                          ^
foo.c:11:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(flag)
  ^~
foo.c:16:0: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      }
 
foo.c:16:6: error: expected declaration or statement at end of input
      }
      ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-2 素数专题:素数判断
比赛
中北 计算机2021级专业修读指导(1)
语言
C
递交时间
2021-11-30 18:53:23
评测时间
2021-11-30 18:53:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes