+ 3
Largest Number?
What's the largest number this program can handle without crashing? It's not something I really need, but it would be great to know so I can limit the input number to avoid crashing the program. I'm not really expecting an answer. Unless there's some supreme nerd out there who wants to solve it xD Just posting this in hopes that somebody DOES decide to solve it. https://code.sololearn.com/Wm0CPovm9N4L/?ref=app
4 Respostas
+ 4
Hi! You can comparate your input and output with this website:
http://www.calculadoras.uno/factorial/
Then you can know when you must limit the input before the crashing. You can try with the differents ranges of int.
+ 2
Joshua Martin Fontanilla Is there some kind of joke I'm missing. Should I click that link? (insert thinking emoji)
+ 1
Well, for Java, the range for an int is -2,147,483,648 to 2,147,483,647.
Long: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
Short: -32,768 to 32,767
Not sure if these are related but it's worth trying to see if your program won't crash with these numbers.
+ 1