In JavaScript, how to find Strong number & Perfect number?
Some foundational questions:
how do we extract digits in Javascript using while loop?
How do we find out STRONG NUMBERS or not using while loop?
What is a nested while loop?
thank you
Definition: Strong numbers are the sum of factorials are same as the original number(eg.145)
Perfect numbers are the sum of the proper divisors make the sum(eg.28)
About Strong numbers, the steps are:
- Extract digits
- Factorials
- Sum up the factorials
- Check whether the sum is the same as the original number
Need to know the programming.
thx