Problem 57795. Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True or False.
An Armstrong number is one whose sum of digits raised to the power of the number of digits equals the number itself. For example, 371 is an Armstrong number because 3^3 + 7^3 + 1^3 = 371.
Solution Stats
Problem Comments
-
3 Comments
Ramon Villamangca
on 17 Mar 2023
Hi Md,
The definition of Armstrong number is incorrect. Armstrong numbers are equal to sum of their own digits to the power of the number of digits (not power of three).
ChrisR
on 17 Mar 2023
This problem is a more general version of Cody Problem 1407.
goc3
on 19 Apr 2023
The problem description has been edited slightly to correctly refer to the power number.
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1231 Solvers
-
Who knows the last digit of pi?
679 Solvers
-
Find the largest value in the 3D matrix
1611 Solvers
-
Simple equation: Annual salary
4220 Solvers
-
Find the mode of the given input
113 Solvers
More from this Author8
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!