Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120429 金毓梵 计算平均数 C++ Compile Error 0 MS 0 KB 258 2025-05-25 18:27:41

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[5],sum=0; for(int i=0;i<5;i++) { cin>>a[i]; sum+=a[i]; } printf("%.2lf\n",sum*1.0/5) for(int i=0;i>5;i++){ if(a[i]>sum*1.0/5) cout<<a[i]<<" ": } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:5: error: expected ';' before 'for'
     for(int i=0;i>5;i++){
     ^
Main.cc:11:17: error: 'i' was not declared in this scope
     for(int i=0;i>5;i++){
                 ^