Switch Case Program
Switch Case Program
h>
int main()
int operand1,operand2,sum,diff,mul,division;
char operator;
while(1){
printf("**************************************************************\n");
printf("***********************************************************\n");
scanf("%d",&operand1);
scanf(" %c",&operator);
scanf("%d",&operand2);
switch(operator){
case'+':
sum=operand1+operand2;
break;
case '-':
diff=operand1-operand2;
mul=operand1*operand2;
case '/':
division=operand1/operand2;
default:
printf("invalid input");
return 0;