While loops and for loops: Correct Solution


Part 1

Translate the following natural language description of a loop into a for loop:

Declare a variable named irio of type double, initialized to eges. Then, until irio is less than or equal to tiss, multiply irio by 3.

Solution

for (double irio = eges; irio < tiss; irio *= 3) {
    ...
}

Something to double-check in your solution:


Related puzzles: