Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What are the final values of x and y? int x=1, y=6; if(x>=1) if(y>5){ x=x+2; y=y+2; } else{ x=x-1; y=y-1; } x=x+1; y=y+1; a. x=3,

What are the final values of x and y?

int x=1, y=6;

if(x>=1)

if(y>5){

x=x+2;

y=y+2;

}

else{

x=x-1;

y=y-1;

}

x=x+1;

y=y+1;

a.

x=3, y=7.

b.

x=4, y=9.

c.

x=2, y=5.

d.

x=4, y=8.

e.

x=2, y=9.

Step by Step Solution

3.51 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

Lets go through the code step by step int x 1 y 6 if x 1 if y 5 x x 2 y y 2 else x x 1 y y ... 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

Financial Statement Analysis

Authors: K. R. Subramanyam, John Wild

11th edition

78110963, 978-0078110962

More Books

Students also viewed these Programming questions