[code]
#include<iostream>
using namespace std;
int main()
{
int e;
cout<<"1.Addition"<<endl;
cout<<"2.Subtraction"<<endl;
cout<<"3.Multiplication"<<endl;
cout<<"4.Long Addition"<<endl;
cout<<"5.Devision"<<endl;
cin>>e;
if (e==1)
{
cout<<"Welcome to Addition"<<endl;
int g;
int b;
cout<<"Enter the two numbers you want to add "<<endl;
cin>>g;
cin>>b;
int add;
add = g + b;
cin.get();
cout<<g<<" plus "<<b<<" is "<<add<<endl;
cin.get();
if (e==2)
{
int x;
int y;
cout<<"Welcome to subtraction"<<endl;
cout<<"Enter the two numbers you want to subtract "<<endl;
cin>>x;
cin>>y;
int sub;
sub = x - y;
cin.get();
cout<<x<<" subtract "<<y<<" is "<<sub<<endl;
cin.get();
if (e==4)
{
int z;
int q;
int w;
int k;
int f;
cout<<"Welcome to Long Addition"<<endl;
cout<<"Enter the five numbers you want to add "<<endl;
cin>>z;
cin>>q;
cin>>w;
cin>>k;
cin>>f;
int ladd;
ladd = z + q + w + k+ f;
cin.get();
cout<<z<<" add "<<q<<" add "<<w<<" add "<<k<<" add "<<f<<" is "<<ladd<<endl;
cin.get();
if (e==5)
{
cout<<"Welcome to Devision"<<endl;
int t;
int g;
cout<<"Enter the two numbers you want to devide "<<endl;
cin>>t;
cin>>g;
int div;
div = t / g;
cin.get();
cout<<t<<" divided by "<<g<<" is "<<div<<endl;
cin.get();
if (e==3)
{
cout<<"Welcome to Multiplication"<<endl;
int i;
int h;
cout<<"Enter the two numbers you want to Multiply "<<endl;
cin>>i;
cin>>h;
int mul;
mul = i * h;
cin.get();
cout<<i<<" Multiplied by "<<h<<" is "<<mul<<endl;
cin.get();
}
return 0;
}
}
}
}
}
[code]
That is a calculator i made i want it so if you press 1 it goes to addition but if i press 2,3,4 it dosent go to the option the screen closes