61.4k views
0 votes
NEED HELP ASAP JAVA

multiple choice
How many times will the following loop repeat?
int num = 49;
while (num > 0)
{
if (num % 2 == 0)
{
num++;
}
else
{
num--
}
}
A. 21
B. 22
C. 20
D. Infinite Loop
E. 23

1 Answer

4 votes
I think is C tbh sorry if that’s wrong my fault
User Henry Ma
by
4.4k points