int ledpins[3] = {12, 13, 14};
int buttonpins[3] = {4, 18, 23};
void setup() {
for (int a = 0; a < 3; a++) {
pinMode(ledpins[a], OUTPUT);
pinMode(buttonpins[a], INPUT_PULLUP);
}
}
void loop() {
for (int a = 0; a < 3; a++) {
if (digitalRead(buttonpins[a])) {
digitalWrite(ledpins[a], 0);
} else {
digitalWrite(ledpins[a], 1);
}
}
}