[PR #1552] Refactor Armstrong number calculation logic #2158

Open
opened 2026-01-29 15:29:41 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1552
Author: @fayasnoushad
Created: 1/26/2026
Status: 🔄 Open

Base: masterHead: patch-1


📝 Commits (1)

  • 5b87d3c Refactor 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.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1552 **Author:** [@fayasnoushad](https://github.com/fayasnoushad) **Created:** 1/26/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`5b87d3c`](https://github.com/TheAlgorithms/C/commit/5b87d3c836b4e3bb5e3b450f826e93c2b821ef50) Refactor Armstrong number calculation logic ### 📊 Changes **1 file changed** (+27 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `math/is_armstrong.c` (+27 -7) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:29:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2158