title: Why does my program not work as an exe file?
body: <p>Hi I'm new to this programming thing. I just started to learn C++ in preparation for my Sophomore year in college.
  So I was following some tutorials and got this "calculator" program completed. I'm using CodeBlocks as my IDE. It automatically creates an exe file that you can open and run the program. in the IDE when i run. everything works perfectly as intended.</p>
  
  <p>However running the exe program it automatically shuts down right after i input my second number. Instead of displaying the sum difference or product of the two numbers it just turns off.</p>
  
  <p>Here is my code</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  string input;
  
     cout &lt;&lt; "Addition(A), Subtraction(S), Multiplication(M), or Division(D)"&lt;&lt;endl;
     cin &gt;&gt;input;
     int a;
     int b;
  
     if(input == "Addition")
     {
         cout &lt;&lt; "Enter Your First Number\n";
         cin&gt;&gt;a;
         cout &lt;&lt; "Enter Your Second Number\n";
         cin&gt;&gt;b;
         int sum = a+b;
         cout &lt;&lt; "Here is the sum of the two numbers:" &lt;&lt;sum;
     }
     else if(input == "Subtraction"){
          cout &lt;&lt; "Enter Your First Number\n";
          cin&gt;&gt;a;
          cout &lt;&lt; "Enter Your Second Number\n";
          cin&gt;&gt;b;
          int sub = a-b;
          cout&lt;&lt; "Here is the subtraction of the two numbers:" &lt;&lt; sub;
     }
     else if(input == "Multiplication")
     {
          cout &lt;&lt; "Enter Your First Number\n";
          cin&gt;&gt;a;
          cout &lt;&lt; "Enter Your Second Number\n";
          cin&gt;&gt;b;
          int product = a*b;
          cout&lt;&lt; "Here is the product of the two numbers:" &lt;&lt; product;
     }
     else if(input == "Division")
     {
         cout&lt;&lt;"No Division Please.";
     }
  return 0;
  
  }
  </code></pre>