Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 430 Bytes

File metadata and controls

35 lines (22 loc) · 430 Bytes

Check the given number is Armstrong number or not

Method 1:

Sample input:

Input: 153 or 1634

Sample output:

Armstrong Number of 1634 is 1634

Explanination: 1^3+5^3+3^3 = 153 or 1^4+6^4+3^4+4^4 = 1634

Method 2

Sample input:

No of digits - 3
n = 153

Sample output:

Armstrong Number of 153 is 153

Explanination: 1^3+5^3+3^3 = 153