Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
116642 | 黄梓皓 | 找最大的数 | C++ | Compile Error | 0 MS | 0 KB | 208 | 2025-04-12 12:41:16 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int maxa=a[0];//为0 for(int i=1;i<n;i++){ if(a[i]>maxa){ maxa=a[i]; } } cout<<maxa; return 0; }
Main.cc: In function 'int main()': Main.cc:6:12: error: 'a' was not declared in this scope int maxa=a[0];//为0 ^