Computer Science, asked by shadowkingt0321, 2 months ago

covert “if” statement into “ternary operator” [2]
if (a>b)
max=a;
else
max=b

Answers

Answered by BrainlyProgrammer
1

 \red \dag \sf Answer \\ \orange{ \sf \: max =(a > b)?a: b; }

Wanna know facts?

  1. Ternary operator is also known as Conditional Operator.
  2. Syntax: variable=(condition)? expression 1: expression 2;
Similar questions