| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151404 | 王顺煜 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 374 | 2026-04-12 12:09:52 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[101],b,c,n;//n代表学生人数 cin>>n; cin>>a[1]; sum1=a[1]; maxi=a[1]; min1=a[1]; for(int i=2;i<=n;i++){ cin>>a[i]; sum1+=a[i]; if(max1<a[i])max1=a[i]; if(min1>a[i])min1=a[i]; } printf("%d %.2lf %d %d",sum1,sum1*1.0/max1,min1); return 0; }
Main.cc: In function 'int main()':
Main.cc:7:5: error: 'sum1' was not declared in this scope
sum1=a[1];
^
Main.cc:8:5: error: 'maxi' was not declared in this scope
maxi=a[1];
^
Main.cc:9:5: error: 'min1' was not declared in this scope
min1=a[1];
^
Main.cc:13:9: error: 'max1' was not declared in this scope
if(max1