Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150492 王峻熙 计算平均数 C++ Compile Error 0 MS 0 KB 298 2026-03-28 14:26:52

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int a[5],i; double o=0,c=0; for(i=0;i<5;i++){ cin>>a[i]; o+=a[i]; } c=o/5; cout<<fixed<<setprecision(2)<<c<<endl; for(i=0;i<5;i++){ if(a[i]>c){ cout<<a[i]<<" "; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:31: error: 'setprecision' was not declared in this scope
    cout<