While loops and for loops: Correct Solution


Part 1

Translate the following while loop into a for loop:

double a = 88;
while (a <= caMe) {
    a *= 4;
    enlerk(a, 7);
}

Solution

for (double a = 88; a <= caMe; a *= 4) {
    enlerk(a, 7);
}

Related puzzles: