#include <stdio.h>

int main() 
{
    char oper;
    int leftV, rightV;

    while (ture)
        {
            printf("연산자를 선택하시오(+, -, *, /, %%, q(quit)): \n");
            scanf("%c", &oper);

            if (oper == 'Q' || oper == 'q')
            {
                printf("프로그램을 종료합니다.\n");
                break;
            }

            printf("좌측 피연산자를 입력하시오: \n");
            scanf("%d", &left);
            printf("우측 피연산자를 입력하시오: \n");
            scanf("%d", &right);

            if(oper == '+')
            {
                
            }
            else if (oper == '-')
            {
                
            }
            else if (oper == '*')
            {
                
            }
            else if (oper == '/')
            {
                
            }
            else if (oper == '%')
            {
                
            }
            else
            {
                printf("에러: 잘못된 연산자입니다.\n");
                break;
            }
            
        }
    
    
    return 0;
}

Intégrer sur un site web

Pour intégrer ce projet à votre site web, copiez le code suivant et collez-le dans le HTML de votre site web :