11.Evaluate the following Java expressions, assuming x and y are both declared as integer variables and x = 17and y = 6:
x/y+3 =
x%y*4 =
x-y/3 =
Answer:
a) x / y + 3 = 17 / 6 + 3 = 2 + 3 = 5
b) x % y * 4 = 17 % 6 * 4 = 5 * 4 = 20
c) x –y / 3= 17 - 6 / 3 = 15
Comments
Leave a comment