color[] c = new color[3];
int x;
void setup() {
size(400, 400);
c[0]=color(255, 0, 0); // first color
c[1]=color(0, 255, 0); // second
c[2]=color(0, 0, 255); // third
}
void draw() {
int j = 20;
x = 0;
for (int i = 40; i <= 500; i = i+80 ) {
fill(c[x]);
ellipse(i, 100, 30, 80);
x = x + 1;
if (x>2) {
x=0;
}//if
}//for
}//func
I have managed to fix it but what program or thing are your using to write code? The place I write it it also corrects code but its written too complicated to understand compared to the response you are getting.