Computer Science, asked by khiradhamid, 5 months ago

Write a program that reads two numbers and prints the larger by using a conditional operator
#include <stdio.h>
#include <conio.h>
void main( void)
{
clrscr();
int a,b, larger;
printf("\n Enter First Number :");
scanf("%d",& a);
printf("\n Enter Second Number :" );
scanf("%d",& b);
(a > b)? (larger = a) : (larger = b);
printf("\n largest of %d and %d is %d", a, b, larger);
return 0;
getch();

Answers

Answered by ashu0itkm
0

Answer:

the what you want

if a=5 b= 7

then output = largest of 5 and 7 is 7

Similar questions