#include <stdio.h>
#include <stdlib.h>

#define LED_R 0
#define LED_G 1
#define LED_B 2
#define ON   (1)
#define OFF  (0)

void Check_Ledcolor_R(void);
int swflg;
int led_state;
  
void main(void)
{
  Check_Ledcolor_R();
  Check_Ledcolor_RGB();
}

void Check_Ledcolor_R(void)
{
  swflg = ON;
  if(swflg == ON){
    printf("Switch_ON\n");
    if(led_state!=LED_R)  {
      printf("COLOR_is_not_R\n");
    }
    else if(led_state >= LED_R)  {
      printf("COLOR_is_R\n");
    }
  }
}

void Check_Ledcolor_RGB(void)
{
  swflg = ON;

  if(swflg == ON){
    printf("Switch_ON\n");
    if(led_state>LED_B)  {
      printf("NO_COLOR\n");
    }
    else if(led_state == LED_R)  {
      printf("COLOR_is_R_or_G_or_B\n");
    }
  }
}

