int initialValue = 10; // Initial integer value int redCount = 0; // Counter for red numbers int greenCount = 0; // Counter for green numbers int blueCount = 0; // Counter for blue numbers void setup() { size(600, 200); background(255); // Loop through numbers from 0 to initialValue for (int i = 0; i <= initialValue; i++) { // Check conditions using if/else if/else statement if (i % 2 == 0 && i % 5 == 0) { fill(0, 255, 0); // Green for even and divisible by 5 greenCount++; } else if (i % 2 == 0) { fill(255, 0, 0); // Red for even numbers redCount++; } else { fill(0, 0, 255); // Blue for odd numbers blueCount++; } // Display the number on the canvas textSize(20); text(i, 50 + i * 30, 100); } // Display the counts at the end of the loop fill(0); textSize(16); text("Red count: " + redCount, 50, 150); text("Green count: " + greenCount, 200, 150); text("Blue count: " + blueCount, 350, 150); save("activity11.png"); }