C program to check Strong Number

In this tutorial you will learn about the C program to check Strong Number and its application with practical example.

C Program to check Strong Number

In this tutorial, we will learn to create a C program that will check Strong Number in C programming.

Table Of Contents

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • While loop in C programming.

What is a Strong number?

A strong number is a number whose sum of all digits’  “S” factorial is equal to the number N”. Let S be the sum of FACTORIAL of all the digits in a number is equal to its original number.

Algorithm:-

Program For checking a strong number:-

In today’s tutorial, we will take the input number from the user. Then we will Check the Number is strong number or not. At last, we will print the number is a strong number or not.

With the help of this program, we can check Strong Number.

Program Code:-

 

Output:-

In the above program, we have first initialized the required variable.

  • no = it will hold the integer value.
  • orgno = it will hold the integer value.
  • lastDigit = it will hold the integer value.
  • sum = it will hold the integer value.
  • fact = it will hold the float value.

Taking the input integer number from the user.

Checking the number is a strong number or not.
Printing the output for the program.

 

In this tutorial we have learn about the C program to check Strong Number and its application with practical example. I hope you will like this tutorial.