Loading...
Rewrite the following using ternary operator: if(n1>n2) r = true; else r = false;
Rewrite the following code using the if-else statement: int m= 400; double ch = (m>300) ? (m / 10.0) * 2: (m / 20.0) - 2;
Read the if program segment given below: if (a > b) z = 25; else z = 35; Which one of the following is the correct conversion of the if program segment to ternary?
© 2026 PadhAiPro. This question is provided for educational purposes.