Please help some basic switch code not working?

int inputs[]={22,23,24,25};
int outputs[]={26,27,28,29};
int leds[]={30,31,32,33};
int buttons[]={34,35,36,37};
int count_gpo=5;
int count_button=5;
int compare=0;
void setup()
{
int x;
for(int x=0;x<4;x++)
{
pinMode(inputs[x],INPUT);
pinMode(outputs[x],OUTPUT);
}
}

void loop()
{
count_gpo=5;
count_button=5;
int y;
for(int y=0;y<4;y++)
{

if(inputs[y]==HIGH)
{
count_gpo=y;
}

}

if(count_gpo==0 && compare==0)
{
digitalWrite(outputs[count_gpo],HIGH);
digitalWrite(leds[count_gpo],HIGH);

for(int y=0;y<4;y++)
{
if(y==count_gpo)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else if(count_gpo==1 && compare==0) 
{
digitalWrite(outputs[count_gpo],HIGH);
digitalWrite(leds[count_gpo],HIGH);

for(int y=0;y<4;y++)
{
if(y==count_gpo)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}


}

else if(count_gpo==2 && compare==0)
{
digitalWrite(outputs[count_gpo],HIGH);
digitalWrite(leds[count_gpo],HIGH);

for(int y=0;y<4;y++)
{
if(y==count_gpo)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else if(count_gpo==3 && compare==0)
{
digitalWrite(outputs[count_gpo],HIGH);
digitalWrite(leds[count_gpo],HIGH);

for(int y=0;y<4;y++)
{
if(y==count_gpo)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}
else if(count_gpo==5 && compare==0)
{

for(int y=0;y<4;y++)
{
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}





for(int y=0;y<4;y++)
{

if(buttons[y]==LOW)
{
count_button=y;
}

}

if(count_button==0)
{
digitalWrite(outputs[count_button],HIGH);
digitalWrite(leds[count_button],HIGH);
compare=1;

for(int y=0;y<4;y++)
{
if(y==count_button)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else if(count_button==1)
{
digitalWrite(outputs[count_button],HIGH);
digitalWrite(leds[count_button],HIGH);
compare=1;

for(int y=0;y<4;y++)
{
if(y==count_button)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else if(count_button==2)
{
digitalWrite(outputs[count_button],HIGH);
digitalWrite(leds[count_button],HIGH);
compare=1;

for(int y=0;y<4;y++)
{
if(y==count_button)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else if(count_button==3)
{
digitalWrite(outputs[count_button],HIGH);
digitalWrite(leds[count_button],HIGH);
compare=1;

for(int y=0;y<4;y++)
{
if(y==count_button)
{
y=y+1;
}
digitalWrite(outputs[y],LOW);
digitalWrite(leds[y],LOW);
}

}

else
{
compare=0;
}








}

Moderator edit: Untidy posting - use CODE TAGS

Was there a question with that post?

int buttons[]={34,35,36,37};
    if(buttons[y]==LOW) {

Doesn't ever seem likely, does it?

Is the OP's name meant to be ironic? No indentation and strange use of white space, doesn't seem tidy to me.

Hi guys sorry somebody did the code for me, i am not a programer but learing

how can i fix this code

i am using 4 digital imput
4 outputs
4 led on digital pins
and 4 button imputs

You could try reading the buttons (see reply #1)

Can i pay you to fix the code?

No need - if it had some comments it would be easier, but I'm almost certain a digitalRead is about all it needs.

ok thanks

so sorry what do i need to change

You need to read the pins specified by the values in the array "buttons" instead of comparing the values in the array itself.
See reply #1.

if(digitalRead (buttons[y])==LOW) {

I can't guarantee it will work, but it will be closer to working than it is at the moment.

ta again