#include <iostream>
using namespace std;
int main ()
{
int choice,num1,num2,answer;
cout<<"This is a caculator program which will do math for you\n";
cout<<"Please Choose From one of 4 math operators\n";
cout<<"1 +\n";
cout<<"2 *\n";
cout<<"3 -\n";
cout<<"4 \\n";
cin>>choice;
if (choice==1)
{
cout<<"please enter in two numbers to add" <<answer<<endl;
cin>>num1;
cout<<"you entered"<<num1<<endl;
cin>>num2;
cout<<"you entered"<<num2<<endl;
answer=num1+num2;
cout<<"the answer is "<<answer<<endl;
}
else if(choice==2)
(
cout<<"please enter in two numbers to multiply" <<answer<<endl;
cin>>num1;
cout<<"you entered"<<num1<<endl;
cin>>num2;
cout<<"you entered"<<num2<<endl;
answer=num1*num2;
cout<<"the answer is "<<answer<<endl;
)
else if (choice==3)
(
cout<<"please enter in two numbers to subtract" <<answer<<endl;
cin>>num1;
cout<<"you entered"<<num1<<endl;
cout<<"num1/\n";
cin>>num2;
cout<<"you entered"<<num2<<endl;
answer=num1-num2;
cout<<"the answer is "<<answer<<endl;
)
else if(choice==4)
cout<<"please enter in two numbers to divide" <<answer<<endl;
cin>>num1;
cout<<"you entered"<<num1<<endl;
cin>>num2;
cout<<"you entered"<<num2<<endl;
answer=num1/num2;
cout<<"the answer is "<<answer<<endl;
return 0;
)
i know i am doing something wrong with the if else statements but i cant figure out what it is the program seems to look right but its giving me errors such as illegal else/if and syntax errors i know overall it is almost there if someone can guide me through the last part i would appreciate it greatly