//a program to get greatest number among three numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;
printf("enter numbers\n");
scanf("%d%d%d",&x,&y,&z);
if(x>y && x>z)
{
printf("x is greatest");
}
elseif(y>x && y>z)
{
printf("y is greatest\n");
}
else
{
printf("z is greatest");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;
printf("enter numbers\n");
scanf("%d%d%d",&x,&y,&z);
if(x>y && x>z)
{
printf("x is greatest");
}
elseif(y>x && y>z)
{
printf("y is greatest\n");
}
else
{
printf("z is greatest");
}
getch();
}
No comments:
Post a Comment