Assume that the int variables x, y, z, and low have been pro…
Assume that the int variables x, y, z, and low have been properly declared and initialized. The code segment below is intended to print the sum of the greatest two of the three values but does not work in some cases. if(x > y && y > z){ low = z;}if(x > y && z > y){ low = y;}else { low = x;}System.out.println(x + y + z – low); For which of the following values of x, y, and z does the code segment NOT print the correct value?
Read Details