Write a program to find maximum number between two number using ternary operator

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,max;
printf("enter first number");
scanf("%d",&a);
printf("enter second number");
scanf("%d",&b);
max=(a>b)?a:b;
printf("max value is %d",max);
}

No comments:

Post a Comment