public class Main {
public static void main(String[] args) {
int x = 0;
int y = 1;
int z = 8;
while (x < z) {
while (y > z) {
x++;
y–;
}
y += ++x;
}
x += y;
System.out.println(x);
}
}
Qual será a saída do programa Java mostrado acima?
public class Main {
public static void main(String[] args) {
int x = 0;
int y = 1;
int z = 8;
while (x < z) {
while (y > z) {
x++;
y–;
}
y += ++x;
}
x += y;
System.out.println(x);
}
}
Qual será a saída do programa Java mostrado acima?