0

List all the curious number from 10^1 up to 10^6.

A curious number is defined by a having a sum of the factorials of each digit equal to itself. For example: 145 = 1! (1) + 4! (24) + 5! (125) = 145. Write a C++ code that would list all the curious number from 10^1 up to 10^6.

31st May 2021, 5:48 AM
Alex Thena
Alex Thena - avatar
1 Respuesta
+ 1
What exactly are you struggling with? The factorial calculation? Going over all the digits of a number? Or putting it all together to list the curious numbers? It would be helpful if you could explain where you are having issues, and post your code as well. Right now, this thread looks more like homework assignment instead of an actual question.
31st May 2021, 7:09 AM
Shadow
Shadow - avatar