记录详情

Compile Error

/in/foo.c:3:1: error: unknown type name 'bool'
 bool isprime(int x)
 ^~~~
/in/foo.c: In function 'isprime':
/in/foo.c:6:12: error: 'false' undeclared (first use in this function)
     return false;
            ^~~~~
/in/foo.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:5: error: stray '\357' in program
   if(x%i==0)
     ^
/in/foo.c:8:6: error: stray '\274' in program
   if(x%i==0)
      ^
/in/foo.c:8:7: error: stray '\210' in program
   if(x%i==0)
       ^
/in/foo.c:8:8: error: expected '(' before 'x'
   if(x%i==0)
        ^
/in/foo.c:8:8: warning: statement with no effect [-Wunused-value]
/in/foo.c:8:14: error: stray '\357' in program
   if(x%i==0)
              ^
/in/foo.c:8:15: error: stray '\274' in program
   if(x%i==0)
               ^
/in/foo.c:8:16: error: stray '\211' in program
   if(x%i==0)
                ^
/in/foo.c:10:9: error: 'true' undeclared (first use in this function)
  return true;
         ^~~~
/in/foo.c: In function 'main':
/in/foo.c:15:15: error: stray '\357' in program
  scanf("%d,&x");
               ^
/in/foo.c:15:16: error: stray '\274' in program
  scanf("%d,&x");
                ^
/in/foo.c:15:17: error: stray '\211' in program
  scanf("%d,&x");
                 ^
/in/foo.c:15:18: error: stray '\357' in program
  scanf("%d,&x");
                  ^
/in/foo.c:15:19: error: stray '\274' in program
  scanf("%d,&x");
                   ^
/in/foo.c:15:20: error: stray '\233' in program
  scanf("%d,&x");
                    ^
/in/foo.c:16:2: error: expected ')' before 'for'
  for(int x1=3;x1<=x/2;x1=x1+2)
  ^~~
/in/foo.c:20:11: warning: missing terminating " character
    printf("%d==%d+%d/n“,x1,x2);
           ^
/in/foo.c:20:11: error: missing terminating " character
    printf("%d==%d+%d/n“,x1,x2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:15:10: warning: format '%d' expects a matching 'int *' argument [-Wformat=]
  scanf("%d,&x");
          ^
/in/foo.c:23:1: error: expected declaration or statement at end of input
 }
 ^
/in/foo.c:14:6: warning: unused variable 'x' [-Wunused-variable]
  int x;
      ^
/in/foo.c: In function 'isprime':
/in/foo.c:11:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
泰院2401程序设计基础作业赛第四场
语言
C
递交时间
2024-11-11 16:42:26
评测时间
2024-11-11 16:42:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes