Computer Science, asked by tsanjeeb82, 3 months ago

Rewrite the following using ternary operator
if (a>=18)
c=20
else
c=15​

Answers

Answered by BrainlyProgrammer
1

Question:-

  • Rewrite the following using ternary operator

if(a>=18)

c=20;

else

c=15;

Answer:-

c=(a>=18)? 20:15;

Similar questions