标签:os io for c ios return include ie
#include<iostream>
using namespace std;
int JiShuJieCheng(int);
int main()
{
int n;
int sum=0;
cout<<"please input an number : "<<endl;
cin>>n;
for(int j=1;j<=n;j++,j++)
{
sum+=JiShuJieCheng(j);
}
cout<<sum<<endl;
return 0;
}
int JiShuJieCheng(int p)
{
int m=1;
for(int i=1;i<=p;i++)
{
m*=i;
}
return m;
}
13.输入一个数,求1! + 3! - 5! + 7! - 9! ……(2*n+1)!?,布布扣,bubuko.com
13.输入一个数,求1! + 3! - 5! + 7! - 9! ……(2*n+1)!?
标签:os io for c ios return include ie
原文地址:http://www.cnblogs.com/jixiaowu/p/3890566.html