void main()
Author: Sanif S S
Site: theeduzone.blogspot.com
Email: sanifss@gmail.com#include<stdio.h>
#include<conio.h>
{
clrscr();
int n,c,t,s=0;
printf("enter a number\n");
scanf("%d",&n);
t=n;
while(n>0)
{
c=n%10;
s=s+(c*c*c);
n=n/10;
}
if(s==t)
{
printf("the number is armstrong");
}
else
{
printf("the number is not armstrong");
}
getch();
}
No comments:
Post a Comment