Yatendra AwanaJul 21, 20211 min readwrite a c program to print the larger of two numbers using conditional operator. #include<stdio.h>void main(){ int a,b,max; printf("Enter values for a and b :"); scanf("%d%d",&a,&b); max = a>b ? a : b; /*ternary operator*/ printf("Larger of %d and %d is %d\n",a,b,max); getch();}
#include<stdio.h>void main(){ int a,b,max; printf("Enter values for a and b :"); scanf("%d%d",&a,&b); max = a>b ? a : b; /*ternary operator*/ printf("Larger of %d and %d is %d\n",a,b,max); getch();}
Program to find biggest number from three given numbersProgram to find biggest number from three given numbers