记录详情

Compile Error

/in/foo.c:2:1: error: unknown type name 'bool'
 bool isprime(int x)
 ^~~~
/in/foo.c: In function 'isprime':
/in/foo.c:7:21: error: 'true' undeclared (first use in this function)
  if (m == x) return true;
                     ^~~~
/in/foo.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:14: error: 'false' undeclared (first use in this function)
  else return false;
              ^~~~~
/in/foo.c: At top level:
/in/foo.c:10:1: error: unknown type name 'bool'
 bool issuperprime(int x)
 ^~~~
/in/foo.c: In function 'issuperprime':
/in/foo.c:14:26: warning: statement with no effect [-Wunused-value]
   if (isprime(x / 10)) x % 10;
                        ~~^~~~
/in/foo.c:15:15: error: 'false' undeclared (first use in this function)
   else return false;
               ^~~~~
/in/foo.c:17:9: error: 'true' undeclared (first use in this function)
  return true;
         ^~~~
/in/foo.c: In function 'main':
/in/foo.c:22:2: warning: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
  scanf_s("%d", &x);
  ^~~~~~~
/in/foo.c: In function 'isprime':
/in/foo.c:9:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/in/foo.c: In function 'issuperprime':
/in/foo.c:18:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
A5-1 超级素数判断
语言
C
递交时间
2023-07-05 12:34:55
评测时间
2023-07-05 12:34:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes