While loops and for loops: Correct Solution


Part 1

Translate the following while loop into a for loop:

double ocio = bil;
while (ocio < rup) {
    ocio--;
    hordno(ocio, 43);
    puwam();
}

Solution

for (double ocio = bil; ocio < rup; ocio--) {
    puwam();
    hordno(ocio, 43);
}

Related puzzles: