While Loop Iteration Count
How many times will the body of the following while loop execute?
int a = 0;
while(a < 6 && a % 2 == 0) {
a++;
}
A
2
B
6
C
3
D
1
Question Leaderboard
Not enough data yet to show leaderboard.
How many times will the body of the following while loop execute?
int a = 0;
while(a < 6 && a % 2 == 0) {
a++;
}
2
6
3
1
Not enough data yet to show leaderboard.