Special Number C Program

By | March 11, 2016

2 Ways To Check Special Number in C Programming

Let us learn how to check special number in C programming language. It is important to know Factorial Program in C before you proceed with this code. Also Check Spe

Also, check special numbers from 1 till N in C code. This program for Krishna Murthy Number makes use of while loop which helps in the iterative process.

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.

What is a Special Number?

An Integer is said to be a special number if the sum of the factorial of every digit is equal to the number itself.


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 developed in Linux Ubuntu operating system and compiled with GCC compiler.

Code To Check Special Number in C Program 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

C Program Code To Check Special Number From 1 To N


C Program To Check Special Number with While Loop

If you get any compilation errors or if you have any doubts about this C program to find special number or Krishna Murthy number, do mention about it in the comment section.

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