Computer Science, asked by Rushikrsingh, 5 months ago

Write using if else.
max= (a>b)? a:b;
Where a=12, b=6​

Answers

Answered by SASHANKSAHIL
2

Answer:

I have pinned the answer image you can check it out dear

Hope you may get it

Mark as brainliest

Thank You...

Attachments:
Answered by anindyaadhikari13
9

Question:-

Write the following code using if else.

Solution:-

Given code,

a=12, b=6;

max=(a>b)?a:b;

Using if-else, we can write like this,

int a=12,b=6,max;

if(a>b)

max=a;

else

max=b;

Similar questions