Compile Error
/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double *' [-Wformat=]
6 | scanf("%f",&x);
| ~^ ~~
| | |
| | double *
| float *
| %lf
/in/foo.c:12:19: warning: implicit declaration of function 'sqr' [-Wimplicit-function-declaration]
12 | y=sqr(5*x+10);}
| ^~~
/usr/bin/ld: /tmp/ccgLS4v6.o: in function `main':
foo.c:(.text.startup+0xb9): undefined reference to `sqr'
collect2: error: ld returned 1 exit status
信息
- 递交者
- 类型
- 自测
- 语言
- C
- 递交时间
- 2025-11-08 15:12:08
- 评测时间
- 2025-11-08 15:12:08
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes