{"id":5389,"date":"2022-01-27T23:00:00","date_gmt":"2022-01-27T17:30:00","guid":{"rendered":"https:\/\/www.codingbroz.com\/?p=5389"},"modified":"2022-01-27T18:09:36","modified_gmt":"2022-01-27T12:39:36","slug":"c-program-to-check-krishnamurthy-number","status":"publish","type":"post","link":"https:\/\/www.codingbroz.com\/c-program-to-check-krishnamurthy-number\/","title":{"rendered":"C Program to Check If the Number is Krishnamurthy Number or Not"},"content":{"rendered":"\n

In this post, we will learn how to check whether a number is Krishnamurthy number or not using C<\/strong> Programming language. But before that, let\u2019s first learn about Krishnamurthy numbers.<\/p>\n\n\n\n

Krishnamurthy number <\/strong>is a number which is equal to the sum of the factorials of its digits. For example: 145 <\/strong>is a Krishnamurthy number because 145 = 1! + 4! + 5! = 1 + 24 + 120 = 145<\/strong>.<\/p>\n\n\n\n

We will check for krishnamurthy number using the following approaches:<\/p>\n\n\n\n

  1. Using For Loop<\/li>
  2. Using While Loop<\/li><\/ol>\n\n\n\n

    So, without further ado, let\u2019s begin this tutorial.<\/p>\n\n\n\n

    \n