Question: An integer number is an Armstrong number if it is equal to the cubic sum of its digits. For example 21 is not an Armstrong
An integer number is an Armstrong number if it is equal to the cubic sum of its digits. For example 21 is not an Armstrong number since 2 3 + 1 3 = 9 = 21 . While 153 is an Armstrong number since 1 3 + 5 3 + 3 3 = 1 + 125 + 27 = 153 . Write a C++ program that prompts the user to enter a positive integer number ( any number of digits ) and checks whether the integer is an Armstrong number or not.
An integer number is an Armstrong number if it is equal to the cubic sum of its digits. For example 21 is not an Armstrong number since 23 1 9 21. While 153 is an Armstrong number since 13+53 3 1 125 27 153. Write a program that prompts the user to enter a positive integer number (any number of digits) and checks whether the integer is an Armstrong number or not. Sample Run: Mark "C:\Coursest1411116VFall2014-2015V Mark "C:\Courses 1411116VFall2014-2015IHM's\Assign nter a nter a positive integer: 26792 is an Armstrong number 6792 is not an Armstrong number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
