Program:
#include<stdio.h>
#include<conio.h>
void main( )
{
int x,y,z,h;
clrscr( );
printf("\nEnter Three Numbers:");
scanf("%d%d%d",&x,&y,&z);
h=((x>y)&&(x>z))?x:(y>z)?y:z;
printf("\nHighest Number is %d",h);
getch( );
}
Input/Output:
Enter Three Numbers:10
20
30
Highest Number is 30
#include<stdio.h>
#include<conio.h>
void main( )
{
int x,y,z,h;
clrscr( );
printf("\nEnter Three Numbers:");
scanf("%d%d%d",&x,&y,&z);
h=((x>y)&&(x>z))?x:(y>z)?y:z;
printf("\nHighest Number is %d",h);
getch( );
}
Input/Output:
Enter Three Numbers:10
20
30
Highest Number is 30
0 comments:
Post a Comment