This program takes an input from the user in the console window and checks if the entered number is an armstrong number. A number is said to be an Armstrong number if and only if the sum of the cubes of each individual digit in that number equals to that number.This program is done in python.
print " Is An Armstrong Number";
print " Is Not An Armstrong Number";
The arm(x) performs operations on the user input x, then it displays the output according to the result achived. r is a variable which stores the last digit of x and s is a variable which stores the sum of the cubes of the digits. Then after the termanating condition, the while loop stops and a condition is used to check whether the variable s is equal to the input.
Latest posts by Bikash Panda (see all)
- Firmata protocol with Raspberry Pi and Arduino - September 13, 2017
- IOT:Power outlet controlled from internet using WeMOS - August 9, 2017
- OSMC on Raspberry PI with Setup and Control using Android App - July 7, 2017