Question
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Financial Statement Analysis
Authors: K. R. Subramanyam, John Wild
11th edition
78110963, 978-0078110962
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App