Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94556 张新福 13求n个数的最小值 C++ Compile Error 0 MS 0 KB 166 2024-10-24 16:18:31

Tests(0/0):


Code:

#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; }


Run Info:

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;
       ^