Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139878 李亭绪 计算平均数 C++ Compile Error 0 MS 0 KB 263 2025-12-10 20:00:01

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; double z; int main(){ int n[5]={}; for(int i=1;i<=5;i++) { cin>>n[i-1]; } z=n/5.00; printf("%.2lf\n",z) for(int i=1;i<=5;i++) { if(a[i]>n); { cout<<a[i]<<" "; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:6: error: invalid operands of types 'int [5]' and 'double' to binary 'operator/'
  z=n/5.00;
      ^
Main.cc:13:2: error: expected ';' before 'for'
  for(int i=1;i<=5;i++)
  ^
Main.cc:13:14: error: 'i' was not declared in this scope
  for(int i=1;i<=5;i++)
              ^