提交记录 #283

提交时间:2024-11-19 19:18:22
语言:c 状态:CompileError
编译情况:编译错误
code.c: In function ‘isprime’:
code.c:31:20: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   31 |     if(n<=0)return 0;
      |                    ^
code.c:30:6: note: declared here
   30 | void isprime(int n){
      |      ^~~~~~~
code.c:32:20: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   32 |     if(n==2)return 1;
      |                    ^
code.c:30:6: note: declared here
   30 | void isprime(int n){
      |      ^~~~~~~
code.c:33:22: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   33 |     if(n%2==0)return 0;
      |                      ^
code.c:30:6: note: declared here
   30 | void isprime(int n){
      |      ^~~~~~~
code.c:35:26: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   35 |         if(n%i==0)return 0;
      |                          ^
code.c:30:6: note: declared here
   30 | void isprime(int n){
      |      ^~~~~~~
code.c:37:12: warning: ‘return’ with a value, in function returning void [-Wreturn-type]
   37 |     return 1;
      |            ^
code.c:30:6: note: declared here
   30 | void isprime(int n){
      |      ^~~~~~~
/usr/bin/ld: /tmp/ccRnwHES.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 号