Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. What will be printed by the code below for each of the following assignments of values to x,y and z? Assume MAX is a
2. What will be printed by the code below for each of the following assignments of values to x,y and z? Assume MAX is a constant with a value of 100; a) int x = 10, y = 80, z = 40; b) int x = 70, y = 150, z = 70; c) int x = 170, y = 30, z = 10; if (y x - y) System.out.println(""); else { System.out.println("D"); System.out.println("E"); } } else if (y + 2 == MAX) System.out.println ("F"); else System.out.println ("G"); System.out.println ("H")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started