multiple if statements HELP

Hi there I'm doing a course in programming and im having issues with my work.
The issue im having is that when i type in 2 into the console it seems to add the 1st number with the 2nd number then minus 1 from it. (3-1). When i want it to say 2
example
type 1= 1+2
type 2= 1-2
type 3= 1*2
type 4= 1/2
PLEASE HELP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
   int Number1=1;
    int Number2=2;
    int enter;
    cout << "Please enter a number between 1 and 4" << endl;
    cin>>enter;
   if (1==1){

    cout << Number1+Number2;

   }else
    if(2==2){

    cout << Number1-Number2;

    }
if (1==1){

What do you think this line does? Similarly, check line 11.
ive changed my code and still having issues.

int x=1;
int y=2;
int enter;
cout << "Please enter a number between 1 and 4" << endl;
cin>>enter;
if (1>=1){
cout << x+y;
}
if(2>=1){
cout << x-y;
}
1
2
3
4
5
6
if (1>=1){
cout << x+y;
}
if(2>=1){
cout << x-y;
}


These if conditions are still both always going to be true.

Do you mean to compare the value input and stored in the enter variable? e.g. if enter == 1, then add the two numbers?
Topic archived. No new replies allowed.