记录详情

Compile Error

foo.c:2:1: error: unknown type name 'bool'; did you mean '_Bool'?
 bool isPrime(int x);
 ^~~~
 _Bool
foo.c: In function 'main':
foo.c:7:17: error: 'false' undeclared (first use in this function); did you mean 'fclose'?
  if(isPrime(x)==false)
                 ^~~~~
                 fclose
foo.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
foo.c: At top level:
foo.c:26:1: error: unknown type name 'bool'; did you mean '_Bool'?
 bool isPrime(int x)//判断素数
 ^~~~
 _Bool
foo.c: In function 'isPrime':
foo.c:29:10: error: 'true' undeclared (first use in this function)
   return true;
          ^~~~
foo.c:31:2: warning: statement with no effect [-Wunused-value]
  for(x1;x1<x;x1++)
  ^~~
foo.c:34:11: error: 'false' undeclared (first use in this function); did you mean 'fclose'?
    return false;
           ^~~~~
           fclose
foo.c: In function 'main':
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&x);
  ^~~~~~~~~~~~~~
foo.c: In function 'isPrime':
foo.c:37:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
语言
C
递交时间
2021-10-14 19:31:38
评测时间
2021-10-14 19:31:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes