#include <stdio.h>

int main() {
    char color;

    printf("신호등의 색깔 입력 (R, G, Y): ");
    scanf(" %c", &color);

    if (color == 'R' || color == 'r')
        printf("정지!\n");
    else if (color == 'Y' || color == 'y')
        printf("주의!\n");
    else if (color == 'G' || color == 'g')
        printf("진행!\n");
    else
        printf("유효하지 않은 색깔\n");

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: