Computer Science, asked by unni58460, 22 hours ago

algorithm to check whether the number is amstrong or not​

Answers

Answered by SpiderBro
0

Answer:

No programming language specified so I'll be explaining the logic

Explanation:

1. Store number to check in a variable

2. Split the number into its individual digits and store their cubes in an Array

3. Then loop through the array, adding every number to a new variable

4. After that, you can check the sum with the original number, if yes, then congratulations, it is an Armstrong Number! And if not, well then it is not an Armstrong number

Similar questions