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 oect of type double, initialized to ce. Then, until oect is less than ics, increment oect.

Solution

for (double oect = ce; oect <= ics; oect++) {
    ...
}

Something to double-check in your solution:


Related puzzles: