Write a C program Largest between two numbers using conditional operator.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter Value of A and B ");
scanf("%d%d",&a,&b);
(a>b)?printf("A is Largest Number"):(b>a)?printf("B is Largest Number"):printf("A and B are equal");
getch();
}


0 Comments