Find the value of x , y after the statements are executed: Both qestions are in the picture files

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question

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

Both qestions are in the picture files

X=3;
if (x==3)
if (2!=2) y=++x;
else y=x++;
y++;
Transcribed Image Text:X=3; if (x==3) if (2!=2) y=++x; else y=x++; y++;
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 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,