//a program to check whether the given number is strong number or not
#include<stdio.h>
void main()
{
//declaring variables
int re; //remainder
int copy;
int i; //counter
int num;
int fact; //factorial
fact=1;
int sum; //sum
sum=0;
//taking input
printf("enter your number:\n");
scanf("%d",&num);
copy=num; //storing the value of num to copy variable
while(copy!=0)
{
re=copy%10;
for(i=1;i<=re;i++);
{
fact=fact*i;}
sum=sum+fact;
fact=1;
copy=copy/10;
}
if(sum==num)
printf("%d is the strong number\n",num );
else
printf("%d is not strong number\n",num);
}