#include<stdio.h>
#include<conio.h>
int main()
{
int d,num1,num2,num3;
printf("Enter 1st no.: \n");
scanf("%d",&num1);
printf("Enter 2nd no.: \n");
scanf("%d",&num2);
printf("Enter 3rd no.: \n");
scanf("%d",&num3);
d=(num1>num2 && num1>num3)?num1:(num2>num3)?num2:num3;
printf("The largest number is %d",d);
getch();
return 0;
}
#include<conio.h>
int main()
{
int d,num1,num2,num3;
printf("Enter 1st no.: \n");
scanf("%d",&num1);
printf("Enter 2nd no.: \n");
scanf("%d",&num2);
printf("Enter 3rd no.: \n");
scanf("%d",&num3);
d=(num1>num2 && num1>num3)?num1:(num2>num3)?num2:num3;
printf("The largest number is %d",d);
getch();
return 0;
}
No comments:
Post a Comment
Convey your thoughts to authors.