/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    double temperature;
    
    printf("현재 온도 입력: ");
    scanf("%lf", &temperature);

    if(temperature>=30.0)
    {
        printf("\n폭염 주의보를 발령합니다.\n");
        printf("건강에 유의하세요.\n");
    }
    printf("\n현재 온도는 섭씨 %.2f도 입니다.", temperature);
    return 0;
}*/



/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    int n;
    
    printf("정수 입력: ");
    scanf("%d", &n);

    if(n%2)
    {
        printf("\n홀수\n");
       
    }
    else
    {
        printf("\n짝수\n");
    }


    (n%2) ? printf("홀수\n") : printf("짝수\n");
    return 0;
}*/


/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    double gpa;
    
    printf("평균평점 입력: ");
    scanf("%lf", &gpa);

    if(gpa>=4.3)
        printf("\n최우등\n");
    else if(gpa>=3.8)
        printf("\n우등\n");
    else if(gpa>=3.0)
        printf("\n우수\n");
    else
        printf("\n3.0 미만");


    return 0;
}*/


/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    int type, point;
    
    printf("번호를 선택 1(1종 면허), 2(2종 면허): ");
    scanf("%d", &type);
    printf("\n점수를 입력: ");
    scanf("%d", &point);

    if(type==1)
    {
        if(point>=70)
            printf("1종 면허 합격");
        else
            printf("불합격");
    }
    else if(type==2)
    {
        if(point>=60)
            printf("2종 면허 합격");
        else
            printf("불합격");
    }


    return 0;
}*/


/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    double x, y, result;
    int op;
    
    printf("두 실수 입력: ");
    scanf("%lf%lf", &x, &y);
    printf("\n연산종류 번호 선택 1(+) 2(-) 3(*) 4(/):");
    scanf("%d", &op);

    switch(op)
    {
        case 1:
            printf("\n%.2f + %.2f = %.2f\n", x, y, x+y);
            break;
        case 2:
            printf("\n%.2f - %.2f = %.2f\n", x, y, x-y);
            break;
        case 3:
            printf("\n%.2f * %.2f = %.2f\n", x, y, x*y);
            break;
        case 4:
            printf("\n%.2f / %.2f = %.2f\n", x, y, x/y);
            break;
        default:
            printf("\n번호를 잘못 입력했습니다.\n");
            break;
            
        
    }


    return 0;
}*/

/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    int month;
    
    printf("월을 입력: ");
    scanf("%d", &month);
   
    switch(month)
    {
        case 3: case 4: case 5:
            printf("\n%d월은 봄 입니다.\n", month);
            break;
        case 6: case 7: case 8:
            printf("\n%d월은 여름 입니다.\n", month);
            break;
        case 9: case 10: case 11:
            printf("\n%d월은 가을 입니다.\n", month);
            break;
        case 12: case 1: case 2:
            printf("\n%d월은 겨울 입니다.\n", month);
            break;
        default:
            printf("\n월을 잘못 입력했습니다.\n");
            break;
            
        
    }


    return 0;
}*/

/*#define _CRT_SECURE_NO_WARNIGS
#include <stdio.h>

int main() {
    int score;
    
    printf("점수 입력: ");
    scanf("%d", &score);
   
    switch(score/10)
    {
        case 10: case 9:
            printf("\n점수가 %d점으로 성적이 %c 입니다.\n", score, 'A');
            break;
        case 8:
            printf("\n점수가 %d점으로 성적이 %c 입니다.\n", score, 'B');
            break;
        case 7:
            printf("\n점수가 %d점으로 성적이 %c 입니다.\n", score, 'C');
            break;
        case 6:
            printf("\n점수가 %d점으로 성적이 %c 입니다.\n", score, 'D');
            break;
        default:
            printf("\n점수가 %d점으로 성적이 %c 입니다.\n", score, 'F');
    }


    return 0;
}*/


#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
    char light;
    char person;
    char emergency;
    int hour;
    
    printf("보행자 여부를 입력하시오 y/n: \n");
    scanf("%c", &person);
    printf("신호등 색깔 (r/y/g) 입력: \n");
    scanf("%c", &light);
    printf("긴급차량 여부(y/n) 입력: \n");
    scanf("%c", &emergency);
    printf("현재 시간 (0~23) 입력: \n");
    scanf("%d", &hour);

    
    return 0;  
}


Embed on website

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