记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:5: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |     scanf_s("%d", &n);
      |     ^~~~~~~
      |     scanf
foo.c:10:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   10 |     for (i = 1; i = n - 2; i++)
      |                 ^
foo.c:12:10: warning: 'count' is used uninitialized [-Wuninitialized]
   12 |     count++;
      |     ~~~~~^~
foo.c:11:8: warning: 'x' may be used uninitialized [-Wmaybe-uninitialized]
   11 |        printf("%d", x);
      |        ^~~~~~~~~~~~~~~
/nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: /tmp/cclMjjVN.o: in function `main':
foo.c:(.text.startup+0x1d): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A2-2 循环结构入门:斐波拉契数列
比赛
2022年迎新赛(第一场)
语言
C
递交时间
2022-08-15 19:56:40
评测时间
2022-08-15 19:56:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes