int initialValue = 6; // Initial integer value void setup() { size(600, 600); background(255); int sumOfOdd = 0; // Initialize sum of odd numbers // Loop through numbers from 0 to initialValue for (int i = 0; i <= initialValue; i++) { if (i % 2 == 0) { // If the number is even, display it on the canvas fill(0); textSize(20); text(i, 50 + i * 50, 100); } else { // If the number is odd, add it to the sum sumOfOdd += i; } } // Display the sum of odd numbers fill(255, 0, 0); textSize(20); text("Sum of odd numbers: " + sumOfOdd, 200, 150); save("activity10.png"); }