#include <iostream>
using namespace std;
void main()
{
int a,b,sum=0,c;
c = 1;sum=1;
for(a=2;a<=20;a++)
{
c=c*a;
sum=sum+c;
}
cout<<sum<<endl;
}
c++作业四
最新推荐文章于 2024-08-12 02:39:24 发布
#include <iostream>
using namespace std;
void main()
{
int a,b,sum=0,c;
c = 1;sum=1;
for(a=2;a<=20;a++)
{
c=c*a;
sum=sum+c;
}
cout<<sum<<endl;
}