Home > Net >  C # use nested while loop statements, calculation of 1! 2! 3! . 10! And of the
C # use nested while loop statements, calculation of 1! 2! 3! . 10! And of the

Time:11-26

C # use nested while loop statements, calculation of 1! + 2! + 3! +... + 10! And of the

CodePudding user response:

You just have a lot of search, baidu will not use it

CodePudding user response:

Is the search

CodePudding user response:

https://jingyan.baidu.com/article/91f5db1b3e98991c7f05e316.html

CodePudding user response:

reference 3 floor plans for melody reply:
https://jingyan.baidu.com/article/91f5db1b3e98991c7f05e316.html

Two while using

CodePudding user response:

Int the Factorial (int I)
{
If (I==1)
return 1;
The else
The return I * Factorial (I - 1);
}

Int I=10;
Int total=0;
While (I!=0)
{
Total +=Factorial (I);
I -;
}

CodePudding user response:

 
# include
Int main ()
{
Int n=1, x, sum=0, j;

While (n<=10)
{
//* x=n;
J=n;
X=1;
While (j!=0)
{
X *=j;
J -;
}
The sum +=x;
N++;
}
Printf (" % d \ n ", sum);
return 0;
}


Your own way for output

CodePudding user response:

Should directly see real project code to learn a language, rather than doing this in vain exercises

CodePudding user response:

, and give you an example of dynamic programming

CodePudding user response:

  •  Tags:  
  • C#
  • Related