记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:24: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    8 |         int limit=(int)sqrt(n);
      |                        ^~~~
/in/foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
/in/foo.c:8:24: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    8 |         int limit=(int)sqrt(n);
      |                        ^~~~
/in/foo.c:8:24: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:19:9: warning: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 |         ptintf("%d is not a primer!\n",n);
      |         ^~~~~~
      |         printf
/usr/bin/ld: /tmp/cc36c5G8.o: in function `main':
foo.c:(.text.startup+0x43): undefined reference to `ptintf'
collect2: error: ld returned 1 exit status

信息

递交者
类型
自测
语言
C
递交时间
2025-11-13 16:39:30
评测时间
2025-11-13 16:39:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes