记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:5:2: warning: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
  scanf_s("%d", &n);
  ^~~~~~~
/in/foo.c:15:12: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    int n = sqrt(h);
            ^~~~
/in/foo.c:15:12: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:15:12: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:31:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
   printf("%d",&cent);
            ^
/tmp/ccKg5Ua5.o: In function `main':
foo.c:(.text.startup+0x13): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status

信息

递交者
类型
自测
语言
C
递交时间
2023-10-01 16:16:51
评测时间
2023-10-01 16:16:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes