#include <iostream>
using namespace std;
int main() {
double a,b;
char answer;
cout<<"what operation do you wish to do? ";
cin>>answer;
switch (answer) {
case '*':
cout<<"multiplication";
cin>>a;
cout<<"* ";
cin>>b;
cout<<a*b;
cin.get();
cin.get();
break;
case '/':
cout<<"division";
cin>>a;
cout<<"/ ";
cin>>b;
cout<<a/b;
cin.get();
cin.get();
break;
case '+':
cout<<"addition";
cin>>a;
cout<<"+ ";
cin>>b;
cout<<a+b;
cin.get();
cin.get();
break;
case '-':
cout<<"subtraction";
cin>>a;
cout<<"- ";
cin>>b;
cout<<a-b;
cin.get();
cin.get();
break;
}
return 0;
}
I am trying to incorporate a loop in this so that i can keep going, but i dont know how.