Skip to content

Refactor Armstrong number calculation logic#1552

Open
fayasnoushad wants to merge 1 commit intoTheAlgorithms:masterfrom
fayasnoushad:patch-1
Open

Refactor Armstrong number calculation logic#1552
fayasnoushad wants to merge 1 commit intoTheAlgorithms:masterfrom
fayasnoushad:patch-1

Conversation

@fayasnoushad
Copy link
Member

Description of Change

An Armstrong number (or narcissistic number) is a number that equals the sum of its own digits, each raised to the power of the total number of digits

eg:-
153 -> 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
1634 -> 1^4 + 6^4 + 4^4 + 3^4 = 1 + 1296 + 81 + 256 = 1634

An Armstrong number (or narcissistic number) is a number that equals the sum of its own digits, each raised to the power of the total number of digits

eg:-
153 -> 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
1634 -> 1^4 + 6^4 + 4^4 + 3^4 = 1 + 1296 + 81 + 256 = 1634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant