Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119800 何睿函 计算平均数 C++ Compile Error 0 MS 0 KB 259 2025-05-19 18:58:42

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[5]; for(int i=0;i<5;i++){ cin>>a[i]; } int s=0; for(int i=0;i<5;i++){ s=s+a[i]; } double x=0; x=s*1.0/n; cout<<x; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:13: error: 'n' was not declared in this scope
     x=s*1.0/n;
             ^