Solved

Which of the Following Loops Will Print the Odd Numbers

Question 91

Multiple Choice

Which of the following loops will print the odd numbers between 0 and 20?


A) int num = 1;
While (num < 20)
{
System.out.print (num + " ") ;
Num += 2;
}
B) int num = 1;
While (num < 20)
{
System.out.print (num + " ") ;
Num ++;
}
C)
Int num = 0;
While (num < 20)
{
System.out.print (num + " ") ;
Num += 2;
}
D)
Int num = 1;
While (num < 20)
{
Num += 2;
System.out.print (num + " ") ;
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions