How to realize the sum of factorial numbers by java
This article will explain in detail how to achieve factorial numbers and sum in java. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
N! It means n × (n − 1) ×... × 3 × 2 × 1
For example, 10! = 10 × 9 ×... × 3 × 2 × 1 = 3628800, so 10! The sum of the numbers is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
Find out 100! The numbers of all of you.
System.out.println (countingSundays ())
Analysis:
Although this is simple, it is a bit troublesome. If you take your time to see it, you will not introduce it.
This is the end of the article on "how to achieve factorial numbers in java". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.