| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80086 | 张之隽 | 找最大的数 | C++ | Compile Error | 0 MS | 0 KB | 254 | 2024-07-11 10:59:38 |
#include<bits/stdc++.h> using namespace std; int a[11]; int main(){ int max,k; for(int i=1;i<=10;i++){ cin>>a[i]; } max=a[1]; k=1; for(int i=2;i<=10;i++){ if(a[i]>max){ max=a[i]; k=i; } } } return 0; }
Main.cc: In function 'int main()':
Main.cc:5:10: warning: variable 'k' set but not used [-Wunused-but-set-variable]
int max,k;
^
Main.cc: At global scope:
Main.cc:19:2: error: expected unqualified-id before 'return'
return 0;
^
Main.cc:20:1: error: expected declaration before '}' token
}
^