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
1
Answer:
Res=(marks>=90)?Printf("Grade A"):(marks>=80)?Printf("Grade B"):Printf("Grade A");
Similar questions
English,
3 months ago
Math,
3 months ago
Computer Science,
3 months ago
Social Sciences,
8 months ago
Geography,
8 months ago
English,
1 year ago
Science,
1 year ago