Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98296 黄芃硕 12for循环练习I C++ Compile Error 0 MS 0 KB 141 2024-11-18 18:02:40

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int n=0,m,n; for(int i=1;i<=n;i++) { cout<<i<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:12: error: redeclaration of 'int n'
  int n=0,m,n;
            ^
Main.cc:5:6: note: 'int n' previously declared here
  int n=0,m,n;
      ^
Main.cc:5:10: warning: unused variable 'm' [-Wunused-variable]
  int n=0,m,n;
          ^