Write a program to find the largest number among three numbers.
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
clrscr();
int y,x,z;
printf("Please Enter the value of x:= ");
scanf("%d",&x);
printf("Please Enter the value of y:= ");
scanf("%d",&y);
printf("Please Enter the value of z:= ");
scanf("%d",&z);
if(x>y)
if(x>z)
printf("%d",x);
else
printf("%d",z);
else
if(y>z)
printf("%d",y);
else
printf("%d",z);
getch();
}
#include<conio.h>
#include<math.h>
main()
{
clrscr();
int y,x,z;
printf("Please Enter the value of x:= ");
scanf("%d",&x);
printf("Please Enter the value of y:= ");
scanf("%d",&y);
printf("Please Enter the value of z:= ");
scanf("%d",&z);
if(x>y)
if(x>z)
printf("%d",x);
else
printf("%d",z);
else
if(y>z)
printf("%d",y);
else
printf("%d",z);
getch();
}