Let 153 be a number
So 153 is an armstrong number.
printf("nEnter your number : ");
printf("n%d is an armstrong number.",n);
printf("n%d is not an armstrong number.",n);
In the above program the first while loop is used to calculate the number of digits present in the given number where as the second one is used to check the number is armstrong number or not.
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