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)提供评测服务