#define LED1 2
#define LED2 3
#define LED3 4
#define LED4 5
#define SW1 9
#define SW2 10
#define SW3 11
#define SW4 12
#define SW5 13
void setup() {
  pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);pinMode(LED4, OUTPUT);
  pinMode(SW1, INPUT_PULLUP); pinMode(SW2, INPUT_PULLUP);
  pinMode(SW3, INPUT_PULLUP); pinMode(SW4, INPUT_PULLUP);
  Serial.begin(9600);
}
void loop() {
  if (digitalRead(SW1) == LOW) {
    digitalWrite(LED1, HIGH);
    Serial.println("SW1 is pressed & LED1 ON");
    while (digitalRead(SW1) == LOW);
  }
  else if (digitalRead(SW2) == LOW) {
    digitalWrite(LED2, HIGH);
    Serial.println("SW2 is pressed & LED2 ON");
    while (digitalRead(SW2) == LOW);
  }
  else if (digitalRead(SW3) == LOW) {
    digitalWrite(LED3, HIGH);
    Serial.println("SW3 is pressed & LED3 ON");
    while (digitalRead(SW3) == LOW);
     }
  else if (digitalRead(SW4) == LOW) {
    digitalWrite(LED4, HIGH);
    Serial.println("SW4 is pressed & LED4 ON");
    while (digitalRead(SW4) == LOW);
  } 
  else if (digitalRead(SW5) == LOW) {
    digitalWrite(LED1, LOW);
    digitalWrite(LED2, LOW);
    digitalWrite(LED3, LOW);
    digitalWrite(LED4, LOW);
    Serial.println("SW5 is pressed & All LED is OFF");
    while (digitalRead(SW5) == LOW);
  }
}