Here is an implementation of the summation of N factorial(N的階乘求和)

1、question: 1!+2!+3!+……+N! 2、code: #include<iostream> #include<cstdio>using namespace std; int jc(int x) { int y=1; for(int i=1;i<=x;i++) { y=y*i; } return y; } int n,sum; int main() { scanf("%d",&n);
相關文章
相關標籤/搜索