Home » C Programs » C Program to Check Strong Number

C Program to Check Strong Number

A strong number is one whose factorial sum of all digits equals the number ‘n’. So, to determine a number, whether it is a strong number or not, we must select each digit of the number. 

For example, if the number is 145, we must select 1, 4, and 5; now we will find the factorial of each number, which is 1!. Using this program we can execute the c program to check strong number 

While Loop Definition

A “While” Loop is used to iterate over a certain piece of code until a condition is fulfilled. 

A for loop is used when we (or the computer) know exactly how many times to execute a portion of code (such as shuffling a deck of cards). 

A while loop is a control flow statement in most computer programming languages that allows code to be performed repeatedly based on a supplied Boolean condition. 

The while loop may be viewed as a looping if statement. Looping statement like while loop is very important to execute the program like c program to check strong number 

Factorial Number in C

In mathematics, factorial is the product of all positive integers that are less than or equal to a particular positive integer, indicated by that integer plus an exclamation point. 

If Else Statement in C

If a particular condition is true, the if/else statement executes a block of code. If the condition is not met, another piece of code can be run. The if/else statement is a type of “Conditional” Statement in JavaScript, which is used to conduct different actions based on distinct situations.

C Program to Check Strong Number

int main() 
int n; 
int sum=0; 
printf("Enter the number"); 
int a=n; 
int r; 
int f=fact(r); 
printf("\nNumber is Strong"); 
printf("\nNumber is not Strong"); 
return 0; 
int fact(int r) 
int mul=1; 
for(int i=1;i<=r;i++) 
return mul;


Enter the number 200

Number is not Strong