C语言 求阶乘和求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字.

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 17:17:34

C语言 求阶乘和求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字.
C语言 求阶乘和
求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字.

C语言 求阶乘和求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字.
#include
void main()
{
\x09int n;
\x09long Sn = 0;
\x09long t = 1;
\x09printf("please input n:\n");
\x09scanf("%d",&n);
\x09for(int i = 1; i