foo.c: In function 'main':
foo.c:9:9: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
foo.c:11:17: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
11 | while (n % a == 0)
| ^~~~~
foo.c:13:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
13 | sum = sum + a;
| ^~~
foo.c:14:26: warning: operation on 'a' may be undefined [-Wsequence-point]
14 | a=a++;
| ~^~~~
foo.c:15:18: warning: operation on 'a' may be undefined [-Wsequence-point]
15 | a=a++;
| ~^~~~
foo.c:8:13: warning: variable 'b' set but not used [-Wunused-but-set-variable]
8 | int b;
| ^
/nix/store/j2gmfdd29cp3rcvghmn1a5kgcnmf8myp-binutils-2.40/bin/ld: /tmp/cc2V8vNe.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)提供评测服务