**Objective: **Given a number, write a program to find out whether the number is Armstrong number or not

**What is Armstrong number: **Determine the number of digits in the number. Call that n. Then take every digit in the number and raise it to the n power. Add all those together, and if your answer is the original number then it is an Armstrong number.

**Example: **

N = 123

digits = 3

1^{3}+2^{3}+3^{3}=36

123 is not Armstrong number.

Output: false N = 153

digits = 3

1^{3}+5^{3}+3^{3}=153

153 is an Armstrong number.

Output: true N = 1634

digits = 4

1^{4}+6^{4}+3^{4}+4^{4}=1634

1634 is an Armstrong number.

Output: true N = 2356

digits = 4

2^{4}+3^{4}+5^{4}+6^{4}=2018

2018 is not an Armstrong number.

Output: false

**Approach:**

- Get all the digits in the number.
- Let’s say the count of digits is x.
- Iterate through digits and calculate sum= digit1
^{x}+digit2^{x}+…….+digitx^{x}. - check if the given number is equal to the sum, means the number is Armstrong, return true else number is not Armstrong, return false.

**Complete Code:**

**Output:**

Number 123 is Armstrong Number: false Number 153 is Armstrong Number: true Number 1634 is Armstrong Number: true Number 2356 is Armstrong Number: false