mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-13 05:45:07 +00:00
[PR #1552] Refactor Armstrong number calculation logic #2158
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1552
Author: @fayasnoushad
Created: 1/26/2026
Status: 🔄 Open
Base:
master← Head:patch-1📝 Commits (1)
5b87d3cRefactor Armstrong number calculation logic📊 Changes
1 file changed (+27 additions, -7 deletions)
View changed files
📝
math/is_armstrong.c(+27 -7)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.