switch (choice){
case'a': ans=x+y;
cout<<"What is the sum of the two numbers you put in?";
cin>>z;
break;
case'b': ans=x-y;
cout<<"What is the difference of the two numbers you put in?";
cin>>z;
break;
case'c': ans=x*y;
cout<<"What is the product of the two numbers you put in?";
cin>>z;
break;
case'd': ans=x/y;
cout<<"What is the quotient of the two numbers you put in?";
cin>>z;
break;
case'e': ans=x%y;
cout<<"What is the remainder of the two numbers you put in?";
cin>>z;
break;
}
Note that switch is not a looping/iterative construct. It does a single pass through the cases. Don't be confused by the fact that you can use break to exit the switch.
Your switch looks fine. Can you show the rest of the code? And describe a little about what makes you think the switch is looping?