Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101046 包老师 12序列的第n项 C++ Compile Error 0 MS 0 KB 168 2024-12-14 13:12:42

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int m; m=1; //第一个 int i=0; for(;i<=n-2;){ m=m+i;//第2个 i++; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:10: error: 'n' was not declared in this scope
  for(;i<=n-2;){
          ^