#include<stdio.h>
int main()
{
int i,n;
long p=1,sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
p=p*i;
sum=sum+p;
}
printf("1!+2!+...+%d!=%1d\n",n,sum);
return 0;
}
![这里写图片描述](http://img.blog.csdn.net/20171107225239744?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvengxOTk5MDEyMDY1NDE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
欢迎使用CSDN-markdown编辑器
最新推荐文章于 2023-08-26 13:24:53 发布