English, asked by shreyagupta1680, 6 months ago

Rewrite the following by using ternary operator.

If(marks >=90)

Res="Grade A";

Else If(marks>=80)

Res=""Grade B";

Else

Res="Grade C";​

Answers

Answered by Imblank
3

\bold{\boxed{\color{green}{ANSWER}}}

Res = (marks>=90)?"Grade A":(marks>=80)?"Grade B":"Grade C";

Read my bio once

Similar questions