//calculator
//switch case
#include<iostream.h>
void main()
{
float a,b,c;
int choice;
cout<<"enter the first number=";
cin>>a;
cout<<"enter the second number=";
cin>>b;
cout<<"enter the operation\n1=addition\n2=substraction\n3=multiplication\n4=division\n";
cin>>choice;
switch(choice)
{
case 1:
c=a+b;
cout<<"addition="<<c;
break;

case 2:
c=a-b;
cout<<"substraction="<<c;
break;

case 3:
c=a*b;
cout<<"product="<<c;
break;

case 4:
c=a/b;
cout<<"quotient="<<c;
break;

default:
cout<<"wrong choice";

}
}

explaination:In this program the switch case is being used were the user choses the case before the switch statement is executed.after choosing the case in numbers the chosen case is executed and the result is printed in the last statements but if the choice is not defined then wrong choice message is printed
if this expaination was useful then kindly leave a comment if not still leave a coment