Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164901 计算平均数 C++ Compile Error 0 MS 0 KB 270 2026-11-07 20:17:30

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[5],d,b[5]; for(int i=1;i<=5;i++){ cin>>a[i]; }d=a/5; printf("%.2d",d); cout<<endl; for(int i=1;i<=5;i++){ if(a[i]>d){ cout<<a[i]<<" "; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:10: error: invalid operands of types 'int [5]' and 'int' to binary 'operator/'
     }d=a/5;
          ^
Main.cc:4:13: warning: unused variable 'b' [-Wunused-variable]
  int a[5],d,b[5];
             ^