记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
A3-1 素数专题:因子的和
比赛
2023年新生赛(第一场)
语言
C
递交时间
2023-08-15 14:18:23
评测时间
2023-08-15 14:18:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes