int a = 0; int b = 0; void setup() { size(200, 200); } void draw() { fill(255); rect(0, 0, width, height); fill(0); line(width/2, 0, width/2, height * 3 / 4); line(0, height * 3 / 4, width, height * 3 / 4); text(a, width / 4, height / 4); text(b, width * 3 / 4, height / 4); text("Sum: " + (a + b), width / 4, height * 7 / 8); } void mousePressed() { if (mouseX < width/2) { a++; } else { b++; } }