size(450,400); // 2,4.. int countEven = 0; int countEvenDivWith5 = 0; int countOther = 0; int initial = 15; textSize(20); int xOther = 0; int xEven = 0; int xEven5 = 0; for (int i=0; i <=initial; i++){ if (i%2 == 0 && i%5 == 0){ xEven5 = xEven5 + 25; fill(0, 255, 0); text(i, xEven5, 200); countEvenDivWith5 = countEvenDivWith5 + 1; xEven = xEven + 25; fill(255, 0, 0); text(i, xEven, 100); countEven = countEven + 1; } else if (i%2 == 0) { xEven = xEven + 25; fill(255, 0, 0); text(i, xEven, 100); countEven = countEven + 1; } else { xOther = xOther + 25; fill(0,0,255); text(i, xOther, 300); countOther = countOther + 1; } } fill(0); text("With number from 0 to " + initial + ":", 25, 20); fill(255, 0, 0); text("The count of even numbers: " + countEven, 25, 70); line(0, 120, width, 120); fill(0,255,0); text("The count of even and it is also divisible by 5: " + countEvenDivWith5, 25, 170); line(0, 220, width, 220); fill(0,0,255); text("The count of other (odd) numbers: " + countOther, 25, 270); save("activity11.png");