What is printed by each of these pieces of code? int x = 5; int y =
Fantastic news! We've Found the answer you've been seeking!
Question:
What is printed by each of these pieces of code?
int x = 5;
int y = 10;
while (y > 1){
if (x + y > 16)
System.out.printin ("break");
break;
} do{
System.out.println("x: "+x+" y: "+y) ;
* = x + 3;
y = y - 2;
}while (x < 15) ;
}
What is printed by each of these pieces of code?
int x = 5;
int y = 10;
do {
System.out. println("do while: x: "+x+" y: "+y);
x = x + 3;
y = y - 2;
while (v > 7){
x++;
y--;
System.out.println("while: x: "+x+" y: "+y);
} while (x < 15);
b.
for (int i = 0; i < 4; i++){
System.out.print("i "+i);
for (int j = i-1; j >= -1; j--){
System.out.print(" j "+j);
}
System.out.println();
}
Related Book For
Precalculus Concepts Through Functions A Unit Circle Approach To Trigonometry
ISBN: 9780137945139
5th Edition
Authors: Michael Sullivan
Posted Date: