Subscribe to Feeds

Send Your Projects To georgepj@hotmail.com

We'll Publish It With Your Name :-)

Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]

Check for Strong No.

Click Here To Download C File Of This Program

 //Check For Strong No.  
//Downloaded from www.c4cprog.co.nr
#include<conio.h>
void strong(int n)
{
int i,s,t,p,x,j;
p=n;
s=0;
while(p>0)
{
x=p%10;
t=1;
for(j=1;j<=x;j++)
t=t*j;
s=s+t;
p=p/10;
}
if(s==n)
printf("\nThe No IS STRONG NO.");
else
printf("\nThe No IS NOT STRONG NO.");
}
void main()
{
int n;
clrscr();
printf("Enter The No : ");
scanf("%d",&n);
strong(n);
getch();
}

0 comments:

Post a Comment