In Java Question (3) 30:  Find the value of x , y after the statements are executed:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
Question

In Java

Question (3) 30:  Find the value of x , y after the statements are executed:

 

y=1; x=0; boolean test=true;
if (x==0 || !test)
{
if (2==2) y=++x;
else y=++x;
y=y+2+ --x;
}
else X=2;
Transcribed Image Text:y=1; x=0; boolean test=true; if (x==0 || !test) { if (2==2) y=++x; else y=++x; y=y+2+ --x; } else X=2;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr