#include <stdio.h>

int main() {
    char color;

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

    switch (color) {
    case 'R':
    case 'r':
        printf("정지!\n");
        break;

    case 'Y':
    case 'y':
        printf("주의!\n");
        break;

    case 'G':
    case 'g':
        printf("진행!\n");
        break;

    default:
        printf("유효하지 않은 색깔\n");
        break;
    }

    return 0;
}

Embed on website

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