foo.c: In function 'main':
foo.c:5:9: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
foo.c:15:33: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
15 | int n = sqrt(h);
| ^~~~
foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 | int main()
foo.c:15:33: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
15 | int n = sqrt(h);
| ^~~~
foo.c:15:33: note: include '<math.h>' or provide a declaration of 'sqrt'
foo.c:31:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
31 | printf("%d",¢);
| ~^ ~~~~~
| | |
| | int *
| int
| %ls
/nix/store/j2gmfdd29cp3rcvghmn1a5kgcnmf8myp-binutils-2.40/bin/ld: /tmp/ccNiIonh.o: in function `main':
foo.c:(.text.startup+0x11): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务