For loop question
in
Programming Questions
•
2 years ago
Hello there!
I'm a beginner in programming/processing and I've just started to work with embed for loop.
I wonder why this piece of code doesn't generate three horizontal lines of three ellipses, as the test operator is ''<='' :
size(480, 120);
background(255);
smooth();
noStroke();
for (int y = 0; y <= 40; y += 40) {
for (int x = 0; x <= 40; x += 40) {
fill(140);
ellipse(x, y, 40, 40);
}
}
Sorry if the answer is obvious but I can't figure out how it works right now...
Thanks for your help!
1