#include<stdio.h>
void main()
{
int n,m,b=0,a;
printf("Enter the number ");
scanf("%d",&n);
m=n;
while(n>0)
{
a=n%10;
n=n/10;
b=b+(a*a*a);
}
if(m==b)
printf("%d is amstrong\n",m);
else
printf("%d is not amstrong\n",m);
}
Tech Programming Ideas is one of the best places on the programming for programmers. Learn coding with Tech Programming Ideas tutorials. We are covered android programming, php, yii2 framework, javascript, mysql, vb.net etc.