Write a program to find the largest number between two number using ternary operator in c



#include<stdio.h>

#include<conio.h>

void main()

{

  int n1,n2,n;

  printf("Enter the Number 1st = ");

  scanf("%d",&n1);

  printf("Enter the Number 2nd = ");

  scanf("%d",&n2);

  n=n1>n2?n1:n2;

  printf("Greatest Number is = %d",n);

getch();

}

OUTPUT : - 
Previous Post
First