Computer Science, asked by sujeetkeshari131, 8 months ago

Rewrite the following by using ternary operator. [2]

If(marks >=90)

Res="Grade A";

Else If(marks>=80)

Res=""Grade B";

Else

Res="Grade C";​

Answers

Answered by AnindaBasu
1

Answer:

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

Similar questions