Illegal else without matching if : <p>So I tried to build a simple calculator but I keep getting the same error "illegal else without matching if" after I put the second else I searched the other answer but none seems to help, I would be grateful if someone could give me any tips to fix this  </p>

<pre><code>   #include "stdafx.h"
   #include &lt;iostream&gt;

   using namespace std;

   int main() {

    int number_1;

    cout &lt;&lt; "" &lt;&lt; endl;
    cin &gt;&gt; number_1;

    int number_2;

    cout &lt;&lt; "" &lt;&lt; endl;
    cin &gt;&gt; number_2;

   int number_3 = number_1 + number_2;

   int number_4 = number_1 - number_2;

   int number_5 = number_1 * number_2;

   int number_6 = number_1 / number_2;

   if (number_1 + number_2) {

    cout &lt;&lt; "" &lt;&lt; number_3 &lt;&lt; endl;
   }

   else {

    if (number_1 - number_2) {

        cout &lt;&lt; "" &lt;&lt; number_4 &lt;&lt; endl;
    }
   }

   else {

    if (number_1 * number_2){ 
        cout &lt;&lt; "" &lt;&lt; number_5 &lt;&lt; endl; 4
    }
         }


  else {

    if (number_1 / number_2) {

        cout &lt;&lt; "" &lt;&lt; number_6 &lt;&lt; endl;
    }

   }

   cout &lt;&lt; "Press enter to continue" &lt;&lt; endl;
   cin.ignore(10, '\n');
   cin.get();


   return 0;
}
</code></pre>
