Translate the following natural language description of a loop into a for loop:
Declare a variable namediaraof typeint, initialized too. Then, untiliarais not equal tocioac, incrementiara.
for (int iara = o; iara != cioac; iara++) {
...
}
Something to double-check in your solution:
iara != cioac)?Translate the following while loop into a for loop:
int wors = 85;
while (wors < eshid) {
wors++;
shetna(wors);
}
for (int wors = 85; wors < eshid; wors++) {
shetna(wors);
}
Related puzzles: