Monday, 24 December 2012

Checking if a number is Krishnamurty number:

The program for Checking if a number is Krishnamurty number:


//Krishnamurty number:: abc==a!+b!+c!

#include<stdio.h>
#include<conio.h>
int check(int);
int factorial(int);
void main()
{
int input_number,a;
clrscr();
printf("Enter the number you want to check:");
scanf("%d",&input_number);
a=check(input_number);
if(input_number==a)
{
printf("Yes! The number %d is a Krishnamurty number.",input_number);
}
else
{
printf("No! Its not a Krishnamurty number.");
}
getch();
}

and the output is like:


0 Responses to “Checking if a number is Krishnamurty number:”

Post a Comment

Recent Comments

All Rights Reserved Assignments on C language