...
This is the same as the while loop, but we check the condition at the end of the code block. The do-while-loop will always execute at least once, no matter the condition.
| Code Block |
|---|
int x=0;
do
{
println(x);
x++;
}while(x <= 100); |
Aufgabe
...
Exercise
Write a program that creates a forrest on the screen. (hint, you will need to put a loop inside another loop)