Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
94555 | 张新福 | 13求n个数的最小值 | C++ | Compile Error | 0 MS | 0 KB | 166 | 2024-10-24 16:18:06 |
#include <iostream> using namespace std; int main(){ int n,x,min=0; cin>>n; for(i=1;i<=n;i++){ cin>>x; if(x>min){ min==x; } } cout<<min; }
Main.cc: In function 'int main()': Main.cc:7:6: error: 'i' was not declared in this scope for(i=1;i<=n;i++){ ^ Main.cc:10:7: warning: statement has no effect [-Wunused-value] min==x; ^