1. Consider the following if statement: if (x > 2) { if (y > 2) { z = x + y; System.out.println("z is " + z); } } else System.out.println("x is " + x); What is displayed if the values of x and y are,...


1. Consider the following if statement:


if (x > 2)


{


if (y > 2)


{


z = x + y;


System.out.println("z is " + z);


}


}


else


System.out.println("x is " + x);


What is displayed if the values of x and y are, respectively,


a. 3 and 2.


b. 2 and 2.


c. 3 and 4.






2. Write a multiway if statement to decide the percentage increase of an employee’s salary based on the following merit rating scale:



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here