Please help with the logic
Can anyone please help with the logic.....please
Hey @Poulomi
- Take input of number.
- Calculate the number of digits of the number in a variable say , cnt.
- Extract digit one by one from the number(using % 10).
- Raise it to the power of number of digits and add it to sum.
- After the loop check if the sum is equal to the original number.
- If yes, print true
- otherwise, print false.