Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions