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

A. What is the output if the integer variable y contains 10 ?
B. What is the output if the integer variable y contains 15 ?
C. What is the output if the integer variable y contains 30 ?
int x = 50; if (y > 10) X x = 30; if (y < 20) X = 40; System.out.println (x);
Step by Step Solution
3.43 Rating (159 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
