Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95059 罗迎甲 一起找规律 C++ Compile Error 0 MS 0 KB 164 2024-10-26 17:25:39

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n=1,x=1; for(int a=2;i<=30;i++){ x=x*2; n=n+x; cout<<n<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:14: error: 'i' was not declared in this scope
  for(int a=2;i<=30;i++){
              ^
Main.cc:6:10: warning: unused variable 'a' [-Wunused-variable]
  for(int a=2;i<=30;i++){
          ^