Thursday, February 12, 2015

C program to find greatest number among three numbers


C program to find greatest number among three numbers

#include<stdio.h>
#include<conio.h>

void main()
{
int x,y,z,max;
clrscr();
printf("Enter The Three Numbers:");
scanf("%d%d%d",&x,&y,&z);

max=x;
if(y>max&&y>z)
max=y;
else
if(z>max)
max=z;
printf("
The Greatest Number among %d %d %d is %d",x,y,z,max);

getch();
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.