Write a C program to check whether the given number is Strong or not.

A strong Number is a number whose sum of factorial of its digits is equal to its original number. E.g 145

Strong number in C

Steps to Check Strong Number in C

  1. Input a number.
  2. Calculate factorial of each of its digit and add them.
  3. If sum is equal to the original number,then its a strong number else not.

Check Whether a Number is Strong in C

Output

Strong number program in C

Print all Strong Numbers in the Interval

To do this we have to write the logic to check strong numbers in a separate function and then call that function for every number in the interval using for loop.

Output

Strong numbers between 1 to 1000

That’s all we need to write in C in order to check whether a number is a strong number or not. If you have any doubts share them in the comment section.

Leave a Reply

Close Menu