Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5024 | 谢锦卓 | 04计算平均分 | C++ | Compile Error | 0 MS | 0 KB | 182 | 2024-10-26 10:36:54 |
#include<iostream> // cin\cout\endl using namespace std; int main(){ double ch,ma,en; scanf("%1f%1f%1f",&ch,&ma,&en); printf("%.21f\n",(c+m+e)/3); return 0; }
Main.cc: In function 'int main()': Main.cc:5:34: warning: format '%f' expects argument of type 'float*', but argument 2 has type 'double*' [-Wformat=] scanf("%1f%1f%1f",&ch,&ma,&en); ^ Main.cc:5:34: warning: format '%f' expects argument of type 'float*', but argument 3 has type 'double*' [-Wformat=] Main.cc:5:34: warning: format '%f' expects argument of type 'float*', but argument 4 has type 'double*' [-Wformat=] Main.cc:6:23: error: 'c' was not declared in this scope printf("%.21f\n",(c+m+e)/3); ^ Main.cc:6:25: error: 'm' was not declared in this scope printf("%.21f\n",(c+m+e)/3); ^ Main.cc:6:27: error: 'e' was not declared in this scope printf("%.21f\n",(c+m+e)/3); ^