Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148394 张晓冉 18统计成绩 C++ Compile Error 0 MS 0 KB 683 2026-02-12 20:27:06

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; cin>>n; int cj[100] = {}; double z=0,p=0,zd=0,zx=111111,s = 0; for(int i = 1;i <= n;i++){ cin>>cj[i]; z += cj[i]; } for(int i = 1;i <= n;i++){ if(cj[i]>zd){ zd = cj[i]; }if(cj[i]<zx) zx = cj[i]; } cout<<z<<" "; cout<<fixed<<setprecision(2)<<z/n<<" "; cout<zd<<" "; cout<<zx; return 0; }


Run Info:

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