Special Number C Program

By | March 11, 2016

Let us learn what is a special integer and how to implement special number in C programming language. This C program for Krishna Murthy Number makes use of while loop which helps in the iterative process.

It is important to know factorial program in C before proceeding with the following code. We’ve also demonstrated how to check special numbers from 1 till N in C programming.

What is a Special Number?

A number is said to be a special number if the sum of the factorial of every digit is equal to the number itself. It is, therefore, important to know how to find the factorial of a number to calculate Krishna Murthy number.

A special number is alternatively known as Krishna Murthy’s Number. Prof. Krishna Murthy is an IIT graduate and has formulated the special number concept.


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

Also Read: C Program To Check Armstrong Numbers

Note: This C program to find special integers or Ramanujan’s Number is compiled with GCC compiler on Linux Ubuntu 14.04 operating system.

Method 1: Check Special Number in C Programming with While Loop

If the function isSpecial() returns a value 1, then the entered number is a special integer or the Krishna Murthy number. If the function returns 0, then it is not a special integer.



Check Special Number in C Programming Language

Method 2: C Program To Check Special Number From 1 To N


C Program To Check Special Number with While Loop

Let us discuss more on this C program to find a special number or Krishna Murthy number in the comment section below.


Do let us know if you have any doubts or have any information to share. For information on Krishnamurthy number, check here.

4 thoughts on “Special Number C Program

  1. Puja Shrivastav

    This is amazing. Special number seems to be a combination of Armstrong Number and Factorial concepts in C Programming.

  2. Aakash

    i wanna c code of ->special number which means the sum of the sum of its digits and the product of its digit is equal to the number itself .example 19 is a special number as 1+9=10 and 1*9=9 so 10+9=19.
    so i want c program to find these numbers between limits.

  3. Jitendra Vaswani

    Is this also known as a Unique Integer? I guess, yes.


Let's Discuss