#include <stdio.h>
int main()
{
char operation;
int num1,num2;
printf("Enter the numebr 1:\n");
scanf("%d",&num1);
printf("Enter the number 2:\n");
scanf("%d",&num2);
printf("ENTER THE OPERATION YOU WANT (+,-,*,/) : \n");
scanf(" %c",&operation);
switch (operation)
{
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");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: