Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98918 | 罗迎甲 | 计算平均数 | C++ | Compile Error | 0 MS | 0 KB | 564 | 2024-11-23 17:41:25 |
#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 s[5]; int a; double z; for(int i=0;i<5;i++){ cin>>s[i]; z+=a[i]; } printf("%.2lf\n",z/5); for(int a =0 ;a<5;a++){ if(s[i]>(z/5)) cout<<s[a]<<" "; return 0; }
Main.cc: In function 'int main()': Main.cc:16:15: error: invalid types 'int[int]' for array subscript z+=a[i]; ^ Main.cc:20:14: error: 'i' was not declared in this scope if(s[i]>(z/5)) ^ Main.cc:28:1: error: expected '}' at end of input } ^