A
Q. What is the output of the Java program with IF-ELSE-IF statements?
Code:
int marks=55;
if(marks >= 80)
System.out.println("DISTINCTION");
else if(marks >=35)
System.out.println("PASS");
else
System.out.println("FAIL");
if(marks >= 80)
System.out.println("DISTINCTION");
else if(marks >=35)
System.out.println("PASS");
else
System.out.println("FAIL");
- Correct Answer - Option(B)
- Views: 8
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.