• 8
  • Locked
On Planet Linear Chaos, infants are expected to find the factorial of two-digit numbers. Well, we'll behave like adults, like programmers, and write a method that calculates factorials up to the entered number.
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Jonaskinny Java Developer at Sandmedia
10 March 2022, 03:38
Actually its BigDecimal (see import statement) and it wont let you do dec = new BigDecimal(dec.intValue() * x);
Thành Black
Level 49 , Hanoi
26 September 2021, 02:06
What. I don't know it before.
Level 23 , Columbia, United States
11 August 2020, 19:45
Use BigInteger. They won't let you display a number to the e such as: 5.7133839564458505E262. Nope, it's gotta be the WHOLE number, all the digits. That's where BigInteger comes in.
Devonte A
Level 18 , Rubery, United Kingdom
14 July 2020, 08:59
Remember that the int/long types will not be able to store the factorial of large numbers :)