| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151083 | 马俊潇 | 输出学生成绩 | C++ | Compile Error | 0 MS | 0 KB | 467 | 2026-04-04 15:44:41 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int a[3][4]={},n,z=0,p=; for(int i=0;i<=2;i++){ for(int j=0;j<=3;j++){ cin>>a[i][j]; z=a[i][j]+z; } } cin>>n; printf("%2.lf",z/12); for(int j=0;j<=3;j++){ cout<<a[n][j]<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:28: error: expected primary-expression before ';' token
int a[3][4]={},n,z=0,p=;
^
Main.cc:14:22: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
printf("%2.lf",z/12);
^
Main.cc:7:26: warning: unused variable 'p' [-Wunused-variable]
int a[3][4]={},n,z=0,p=;
^