isArmstrongNumber 🌶️🌶️🌶️
An Armstrong number is one where, if you raise each of its digits to the power of the TOTAL NUMBER OF DIGITS and add those up, you get the original number back. For example, 153 has 3 digits, and 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153. Write a method that takes one int parameter, n, and returns true if n is an Armstrong number, or false otherwise. Every single-digit number is trivially an Armstrong number (a single digit raised to the power of 1 is itself).
Precondition: n is 1 or greater.
Do you need the digit count before or after you start raising digits to a power? Could two separate passes help?
Do not hardcode the power as 3, that only works for 3-digit numbers. Compute digitCount first (how many times can you divide by 10 before reaching 0?), then use THAT as the exponent for every digit.