Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96260 | 邹昊辰 | 18患病人数占总患病人数的比例 | C++ | Compile Error | 0 MS | 0 KB | 190 | 2024-11-03 14:53:58 |
#include<iostream> using namespace std; int main(){ int n,a[5]=0,y; cin>>y; if(k>=61)a[4]++; else if(k>=36)a[3]++; else if(k>=19)a[2]++; else if(k>0)a[1]++; return 0; }
Main.cc: In function 'int main()': Main.cc:4:13: error: array must be initialized with a brace-enclosed initializer int n,a[5]=0,y; ^ Main.cc:6:5: error: 'k' was not declared in this scope if(k>=61)a[4]++; ^ Main.cc:4:6: warning: unused variable 'n' [-Wunused-variable] int n,a[5]=0,y; ^