记录详情

Compile Error

foo.c:2:1: error: unknown type name 'bool'
    2 | bool isprime(int n)
      | ^~~~
foo.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | bool isprime(int n)
foo.c: In function 'isprime':
foo.c:4:24: error: 'false' undeclared (first use in this function)
    4 |         if(n==1)return false;
      |                        ^~~~~
foo.c:4:24: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c:4:24: note: each undeclared identifier is reported only once for each function it appears in
foo.c:8:16: error: 'true' undeclared (first use in this function)
    8 |         return true;
      |                ^~~~
foo.c:8:16: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    9 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A9-1 数组中的素数个数
语言
C
递交时间
2023-11-21 14:12:06
评测时间
2023-11-21 14:12:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes