Print Strong Numbers From 1 To N C Program

By | August 14, 2016

C Program To Print Strong Numbers From 1 To N

Let us learn how to print strong numbers from 1 to n in C programming language. This code below is to check if a number is a strong integer or not in C programming using functions, while and for loops.

It is important that we should know how a for loop works before getting further with the C program. A strong number makes use of the factorial in C programming.

What is a Strong Number?

A number is said to be a strong number if the sum of the factorials of the digits of a number is equal to the number itself.

Example

145 = (1!) + (4!) + (5!)
40585 = (4!) + (0!) + (5!) + (8!) + (5!)

Must Read: C Program To Check if a Number is Strong Number

C Program To Print Strong Numbers from 1 To N

 

Must Read: C Program To Calculate GCD of Two Integers

 

Output

C Program To Print Strong Numbers From 1 To N using For and While Loop
In case you get any compilation errors or any doubts in this C program to find strong integers, let us know about it in the comment section below.

2 thoughts on “Print Strong Numbers From 1 To N C Program

  1. Leena Yadav

    Such a simple and easy program for finding strong numbers between 1 to 100. Can we use a separate function for calculating factorial to make it more modular?

    Reply
    1. Tushar Soni Post author

      You can definitely make a separate function to calculate factorial in this c program to print strong numbers from 1 to N. This technique will make your code more readable and easy to debug.

      Reply

Let's Discuss