Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103015 | 郭玉洁 | 18高于平均分的学生数量 | C++ | Compile Error | 0 MS | 0 KB | 333 | 2024-12-28 09:58:16 |
#include<bits/stdc++.h> using namespace std; int main(){ int n [52]; int sam=0; int a=0,c; for(int i=0;i<n;i++){ cin>>n[i]; sam=sam+n[i]; } auy=sam/n; for(int c=0;c>any;c++){ if(n[i]>any){ a++; } } cout<<" "<<any<<" "<<a; return 0; }
Main.cc: In function 'int main()': Main.cc:7:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=0;iany;c++){ ^ Main.cc:13:15: error: 'i' was not declared in this scope if(n[i]>any){ ^ Main.cc:17:17: error: 'any' was not declared in this scope cout<<" "<