Suppose x and y are integer variables, consider the following if ( x> 9) y = 5; else if ( x <9) if (x< 7) y = 6; else y = 7; else y = 8; What is the value of y if x = 9? Oa. 7 Ob.6 Oc. Inyalid input Od. 5 е. 8

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 19RQ
icon
Related questions
icon
Concept explainers
Question
Question 7
Suppose x and y are integer variables, consider the following statement:
if ( x > 9)
y = 53;
else if ( x< 9)
if ( x < 7)
y = 6;
else
y = 7;
else
y = 8;
What is the value of y if x = 9?
Oa. 7
Ob.6
Oc. Inyalid input
O d. 5
O e. 8
Transcribed Image Text:Question 7 Suppose x and y are integer variables, consider the following statement: if ( x > 9) y = 53; else if ( x< 9) if ( x < 7) y = 6; else y = 7; else y = 8; What is the value of y if x = 9? Oa. 7 Ob.6 Oc. Inyalid input O d. 5 O e. 8
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning