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;
Users must be above 10 years to open a self-operated bank account. Write this logic using a ternary operator and store the result (the eligibility message) in a String variable named idStatus and print it.
© 2026 PadhAiPro. This question is provided for educational purposes.