Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148510 张晓冉 18统计成绩 C++ Compile Error 0 MS 0 KB 665 2026-02-23 15:22:48

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<<" "; printf("%2",a/z," "); cout<zd<<" "; cout<<zx; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:23:17: error: 'a' was not declared in this scope
     printf("%2",a/z," ");
                 ^
Main.cc:24:14: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator<<'
     cout