C program to check whether a number is Strong number or not

Write a C program to find number is Strong number or not.

In this program we will find number is strong number of not using C programming. Where the number should enter by a user. We will use the While Loop ,for loop and else if statement in this program. In that program we use user define function for find factorial of number t + 5!=1 + 24 +120=145

 hat will use on find strong number.

Basically  A strong number is a number whose sum of factorials of digits is equal to the same number.

Ex:- number is 145

1! + 4!

So it is a strong number.

Strong number or not in C programming(1)


Step 1- first we enter the number.

Step 2- copy the number into any temporary variable.

Step 3- until temp is not equal to 0, calculate the following statement


     (ii)now we find the factorial of digit.

     (iii)sum=sum+digit, add digit into a sum and store it in the sum.

     (iv)temp=temp/10.divid the temp with 10 

   When temp became zero the above step stop to execute,

Step 4- if the sum of these factorial number is equal to the entered number,so it is the strong number.

Step 5- Stop. 

Competitive Coding Techniques

C Program:-


//find factorial of a number.
int factorial(int number)
//to initialize of factorial
int i,fact=1;
//use for loop with this condition
return fact;
//to main function
int main()
//to initialize variables
int number,digit,sum=0,temp;

//To take user input
printf("Enter a number:");
//To store a duplicity value of a given number

//use this whenever number is not equal to 0
//for last digit
//now we call of factorial function
digit = factorial(digit);
//to improve of a sum on digit
//we check sum is equal to number its true
printf("It is a Strong Number");
//false condition
printf("It is not Strong Number");
return 0;


Enter a number: 145

It is a Strong Number

Enter a number: 123

It is not Strong Number