A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits.
For example, take 153 (3 digits):
13 + 53 + 33 = 1 + 125 + 27 = 153
1634:
14 + 64 + 34 + 44 = 1 + 1296 + 81 + 256 = 1634
The Challenge:
Your code must take input from the user and output True or False depending upon whether the given number is a Narcissistic Number.
Error checking for text strings or other invalid inputs is not required. 1 or 0 for the output is acceptable. Code that simply generates a list of Narcissistic Numbers, or checks the user input against a list, does not qualify.
True
if it's such a number, but anything else (in this case the number itself) if not? \$\endgroup\$ – devRicher Jan 6 '17 at 21:51