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
Solution Comments
Show comments
Loading...
Problem Recent Solvers24
Suggested Problems
-
Determine whether a vector is monotonically increasing
22841 Solvers
-
Remove any row in which a NaN appears
8768 Solvers
-
11519 Solvers
-
What is Sum Of all elements of Matrix
444 Solvers
-
Back to Basics - Find no. of elements in a matrix?
325 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!
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).
This problem is a more general version of Cody Problem 1407.
The problem description has been edited slightly to correctly refer to the power number.