运行 ID 作者 题号 测评结果 分数 时间 内存 语言 代码长度 提交时间
610952 lijunyu 1005 - 球的体积和表面积 编译错误 0 0 MS 0 KB C 430 4个月前
暂时无法获取本题测试点详情。

Main.c: In function 'main':
Main.c:6:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | scanf("%lf", &radius);
| ^~~~~
Main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | double calculateVolume(double radius);
Main.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | scanf("%lf", &radius);
| ^~~~~
Main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
Main.c:9:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
9 | printf("%.2f
", volume);
| ^~~~~~
Main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
Main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Main.c: In function 'calculateVolume':
Main.c:15:26: error: 'M_PI' undeclared (first use in this function)
15 | return (4.0 / 3.0) * M_PI * pow(radius, 3);
| ^~~~
Main.c:15:26: note: each undeclared identifier is reported only once for each function it appears in
Main.c:15:33: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
15 | return (4.0 / 3.0) * M_PI * pow(radius, 3);
| ^~~
Main.c:1:1: note: include '<math.h>' or provide a declaration of 'pow'
+++ |+#include <math.h>
1 | double calculateVolume(double radius);
Main.c:15:33: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
15 | return (4.0 / 3.0) * M_PI * pow(radius, 3);
| ^~~
Main.c:15:33: note: include '<math.h>' or provide a declaration of 'pow'
Main.c:16:1: warning: control reaches end of non-void function [-Wreturn-type]
16 | }
| ^