/******************************************************************/
/* Write a Program for Number is Armstrong Number */
/* Find more programs at http://ecomputernotes.com/ */
/*****************************************************************/
#include<stdio.h>
main()
{
int num,temp,cub,sum=0;
clrscr();
printf("enter a number");
scanf("%d",&num);
temp=num;
while(num>0)
{
cub=num%10;
num=num/10;
sum=sum+(cub*cub*cub);
}
if(temp==sum)
printf("number is armstrong");
else
printf("number is not armstrong");
getch();
}
{/codecitation}
Dinesh Thakur is a Columinist and designer with strong passion and founder
of Computer Notes. if you have any ideas or any request please get @me on Google+
![]()