What is the output of this code? Show exactly what will appear on the screen. (Do not
Fantastic news! We've Found the answer you've been seeking!
Question:
What is the output of this code? Show exactly what will appear on the screen. (Do not use an IDE for this question)
int n = 0;
while (n < 10) {
if (n % 2 == 0) {
n += 5;
} else {
n -= 1;
}
System.out.println(n);
}
Related Book For
Linear Algebra And Its Applications
ISBN: 9781292351216
6th Global Edition
Authors: David Lay, Steven Lay, Judi McDonald
Posted Date: