#include <stdio.h>

int main() {
    int num1,num2;
    char op;
    printf("enter num1 \n");
    scanf("%d",&num1);
    printf("enter num2 \n");
    scanf("%d",&num2);
    printf("enter operation to be done(ONLY '+','-','*','/') \n");
    scanf(" %c",&op);
    switch (op) {
        case '+':
        printf("result is %d\n",num1+num2);
        break;
        case '-':
        printf("result is %d\n",num1-num2);
        break;
        case '*':
            printf("result is %d \n",num1*num2);
            break;
       
        case '/':
            printf("the result is %d \n",num1/num2);
            break;
           
       
        default:
        printf("wrong input\n");
    }
}

Embed on website

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