0
To find the sum of digits of the number which is the result of 100!
100!=number Result=sum of the digits of the number E.g 4!=24 Result=2+4=6 Output=6 https://www.sololearn.com/discuss/2090630/?ref=app
11 Respostas
+ 3
Check this code
https://code.sololearn.com/cm6sjK48lUpo/?ref=app
+ 3
Subhankar We can do by using BigInteger. Check my code again and enter 100.
+ 2
Subhankar Because it's factorial is too high.
Big negative numbers are values that overflowed into certain ranges;
factorial(100) has more than 32 binary zeros on the end, so converting it to an integer produces zero.
+ 2
Subhankar Check now for 100.
+ 1
Okay thnx
+ 1
It is working really!
0
Man the code is good
0
But 100! is not 0 and hence the sum is also not 0
0
So there is really no way to calculate this sum then
0
Well there is an error in the code I think,its not running
0
Subhankar It's running. Check again that was by mistake.