While loops and for loops: Correct Solution


Part 1

Translate the following while loop into a for loop:

int u = 91;
while (u <= acil) {
    u *= 3;
    criIaro(u, 39);
}

Solution

for (int u = 91; u <= acil; u *= 3) {
    criIaro(u, 39);
}

Related puzzles: