C Program to find GREATEST OF THREE NUMBERS..

Program By-Jayant Purohit

#include<conio.h>
#include<stdio.h>
void main()
{
int ch1,ch2,ch3,n;
clrscr();
printf("Please enter the first number :->");
scanf("%d",&ch1);
printf("Please enter the second number :->");
scanf("%d",&ch2);
printf("Please enter the third number :->");
scanf("%d",&ch3);
if(ch1>ch2 && ch1>ch3)
printf("The first Number(%d) is the greatest Number anomg all numbers",ch1);
else
if(ch2>ch1 && ch2>ch3)
printf("The second Number(%d) is the greatest Number anomg all numbers",ch2);
else
printf("The third Number(%d) is the greatest Number anomg all numbers",ch3);
getch();
}

No comments:

Post a Comment

Please write your Views about this Post here:->;

Pageviews last month