+ 1

145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Write a function to determine whether a given number is a curious

Can anyone help me on this Question

31st May 2020, 2:19 AM
Ja Asim
Ja Asim - avatar
3 Réponses
+ 2
Here are the steps you can follow to reach the solution:- 1. split the number into digits n/10; 2. calculate factorial of each digit iteratively or recursively. 3. Sum up the factorial of every digit and compare the sum with the orignal number. if true then you will get your answer.
31st May 2020, 4:43 PM
Robin Singh
Robin Singh - avatar
+ 1
Post ur attempt and we try to fix it Not code all stuff for u Fast
31st May 2020, 2:24 AM
Abhay
Abhay - avatar
31st May 2020, 5:09 AM
Bilbo Baggins
Bilbo Baggins - avatar