提交记录 #285

提交时间:2024-11-19 19:21:27
语言:c 状态:CompileError
编译情况:编译错误
code.c: In function ‘isprime’:
code.c:32:20: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   32 |     if(n<=0)return 0;
      |                    ^
code.c:31:6: note: declared here
   31 | void isprime(int n){
      |      ^~~~~~~
code.c:33:20: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   33 |     if(n==2)return 1;
      |                    ^
code.c:31:6: note: declared here
   31 | void isprime(int n){
      |      ^~~~~~~
code.c:34:22: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   34 |     if(n%2==0)return 0;
      |                      ^
code.c:31:6: note: declared here
   31 | void isprime(int n){
      |      ^~~~~~~
code.c:36:26: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   36 |         if(n%i==0)return 0;
      |                          ^
code.c:31:6: note: declared here
   31 | void isprime(int n){
      |      ^~~~~~~
code.c:38:12: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   38 |     return 1;
      |            ^
code.c:31:6: note: declared here
   31 | void isprime(int n){
      |      ^~~~~~~
/usr/bin/ld: /tmp/cckGITBe.o: in function `main':
code.c:(.text.startup+0x4f): undefined reference to `isPrime'
/usr/bin/ld: code.c:(.text.startup+0x5f): undefined reference to `isPrime'
collect2: error: ld returned 1 exit status
固定测试点暂不可用
... 等待中
time N/A
memory N/A
附加测试点暂不可用
... 不可用
time N/A
memory N/A
京ICP备2024093084 号