foo.c: In function 'isPrime':
foo.c:3:24: error: 'false' undeclared (first use in this function)
3 | if (n <= 1) return false;
| ^~~~~
foo.c:2:1: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 | int isPrime(int n) {
foo.c:3:24: note: each undeclared identifier is reported only once for each function it appears in
3 | if (n <= 1) return false;
| ^~~~~
foo.c:7:12: error: 'true' undeclared (first use in this function)
7 | return true;
| ^~~~
foo.c:7:12: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c:17:5: warning: 'main' is normally a non-static function [-Wmain]
17 | int main() {
| ^~~~
foo.c:38:1: error: expected declaration or statement at end of input
38 | }
| ^
foo.c:39: warning: control reaches end of non-void function [-Wreturn-type]
foo.c: At top level:
foo.c:17:5: warning: 'main' defined but not used [-Wunused-function]
17 | int main() {
| ^~~~
[Hydro](https://hydro.ac)提供评测服务