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

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n=1,x=1; cout<<n; 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:7:14: error: 'i' was not declared in this scope
  for(int a=2;i<=30;i++){
              ^
Main.cc:7:10: warning: unused variable 'a' [-Wunused-variable]
  for(int a=2;i<=30;i++){
          ^