C Program to Make a Simple Calculator Using switch case

Example
#include <conio.h>
#include <stdio.h>
void main()

{
char ch;
int a, b, res;

printf("Enter an Operator (+, *, *, /): ");
scanf("%c", &ch);
printf("Enter two operands: \n");
scanf("%d %d", &a, &b);

switch(ch)

{
case '+':
result = a + b;
break;
case '-':
result = a - b;
break;
case '*':
result = a * b;
break;
case '/':
result = a / b;
break;
}
printf("Result = %d", res);
getch();
}
Program Output

Enter an Operator (+, -, *, /):

+
Enter two operands:
5
7
Result = 12