#include<conio.H>
#include<stdio.h>
void main()
{
int i,k,t,x,r,s=0;
clrscr();
printf("\n Enter any number");
scanf("%d",&x);
t=x;
while(x>0)
{
k=1;
r=x%10;
for(i=1;i<=r;i++)
{
k=k*i;
}
s=s+k;
x=x/10;
}
if(t==s)
{
printf("\n %d is a strong number",t);
}
else
{
printf("\n %d is not a strong number",t);
}
getch();
}
No comments:
Post a Comment