In the following code, what will be the last number to print to the screen before the program finishes?
for (var i = 0; i < 10; i++) {
if (i % 2 == 0) {
println(i);
} else {
println(2 * i);
}
}
A) 15
B) 17
C) 18
D) 22