Question: If the input is 2 5 , what is the output? int x; x = scnr . nextInt ( ) ; if ( x <

If the input is 25, what is the output?
int x;
x = scnr.nextInt();
if (x <10){
System.out.print("W");
}
else if (x <25){
System.out.print("X");
}
else if (x <50){
System.out.print("Y");
}
else {
System.out.print("Z");
}
Group of answer choices
X
Z
W
Y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!