Haig Armen Educational Archive


Exercise 25

by Haig. Average Reading Time: less than a minute.

now let’s nest a while loop inside another while loop to give us a grid



size(400, 400);
noStroke();
background(50);

float x = 0;
while (x < width) {
  float y = 0;
  while (y < height) {
    rect(x, y, 30, 30);
    y = y + 40;
  }
  x = x + 50;
}

No comments on ‘Exercise 25’

Leave a Reply