C++编程,s=1!+2!+3!+.+n!,n的值键盘输入,要求输出n和s的值

来源:学生作业学帮网 编辑:学帮网 时间:2024/06/25 07:56:50

C++编程,s=1!+2!+3!+.+n!,n的值键盘输入,要求输出n和s的值

#include
using namespace std;
void main()
{int n;
long t=1,s=0;
coutn;
for(int i=1;i