Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83930 陈俊洁 阶乘的和 C++ Compile Error 0 MS 0 KB 213 2024-07-15 10:03:02

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int j(int a){ int s=1; for(int i=1;i<=a;i++){ s=s*i; } return s; } int main() { int n; cin>>n; for(int i=1;i<=n;i++){ sum+j(i); } cout<<j(i); }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:2: error: 'sum' was not declared in this scope
  sum+j(i);
  ^
Main.cc:16:9: error: 'i' was not declared in this scope
 cout<