#include <iostream>
usingnamespace std;
int math (int a, int b, char c)
{
int r;
if (c=1)
{r=a+b;}
if (c=2)
{r=a-b;}
if (c=3)
{r=a*b;}
if (c=4)
{r=a/b;}
return (r);
}
int main ()
{
char yon;
int first, second, third, type;
cout << "would you like to do a simple math problem";
cin >> yon ;
do
{
cout << "Enter type\n";
cin >> type;
cout << "You chose " << type << "\n";
cout << "Enter first number\n";
cin >> first;
cout << "First number is " << first << "\n";
cout << "Enter second number\n";
cin >> second;
cout << "Second number is " << second << "\n";
third = math (first, second, type);
cout << "Answer is " << third << "\n" ;
} while (yon = 'y');};