C++求1!+2!+3!+4!+……+20!的值#includevoid main(){int a,b,sum=0,c;for(a=1;a

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 20:29:43
C++求1!+2!+3!+4!+……+20!的值#includevoidmain(){inta,b,sum=0,c;for(a=1;aC++求1!+2!+3!+4!+……+20!的值#includev

C++求1!+2!+3!+4!+……+20!的值#includevoid main(){int a,b,sum=0,c;for(a=1;a
C++求1!+2!+3!+4!+……+20!的值
#include
void main()
{
int a,b,sum=0,c;
for(a=1;a

C++求1!+2!+3!+4!+……+20!的值#includevoid main(){int a,b,sum=0,c;for(a=1;a
阶乘20数值太大,超出整型允许范围,用double:
#include
using namespace std;
void main()
{
double a,b,sum=0,c;
c = 1;sum=1;
for (a=2;a