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
1
B
2
C
6
D
3
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++;
}
1
2
6
3
Not enough data yet to show leaderboard.