top of page
Writer's pictureSatyam Gupta

Krishnamurthy Number in Java

Krishnamurthy Number in Java

Question : Write a program to check whether a number is Krishnamurthy number or not?


Krishnamurthy Number : A number whose sum of the factorial of digits is equal to the number itself.


Examples :-

145

1! + 4! + 5! = (1 X 1) + (4 X 3 X 2 X 1) + (5 X 4 X 3 X 2 X 1) = 1 + 24 + 120 = 145


55

5! + 5! = (5 X 4 X 3 X 2 X 1) + (5 X 4 X 3 X 2 X 1) = 120 + 120 = 240




Note : To understand the program clearly watch this video : Krishnamurthy Number in Java

 

Program to check Krishnamurthy Number in Java :-

Checkout Source Code : Click here

Program Video : Watch Now









46 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page