Question: Given the code segment below, indicate the output for the following initial values of (x) and (y) : A. What is the output if the
Given the code segment below, indicate the output for the following initial values of \(x\) and \(y\) :

A. What is the output if the integer variable \(x\) contains 10 and \(y\) contains -15 ?
B. What is the output if the integer variable \(\mathrm{x}\) contains 100 and \(\mathrm{y}\) contains 20 ?
C. What is the output if the integer variable \(x\) contains 200 and \(y\) contains -100 ?
int z = 0; if (x >= 100) if (y < 0) z = 25; else else z = 50; if (y < 0) z = 75; else z = 100; System.out.println (z);
Step by Step Solution
There are 3 Steps involved in it
Based on the given code segment and the initial values of x and y provided lets determine the output ... View full answer
Get step-by-step solutions from verified subject matter experts
