title: 'cout' statement not being executed
body: <p>The following program  is to find the sum of even-valued fibonacci terms not more than four million.
  The last 'cout' statement in this program doesn't get executed at all. Why is it? Help please.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      int a, b, c, sum, sum1, sum2;
      a = 1;
      b = 2;
      sum2 = 0;
  
      cout &lt;&lt; b &lt;&lt; endl;
      c = a + b;
  
      sum1 = c;
  
      while (c &lt;= 4000000)
      {
          a = b;
          b = c;
          if ((a + b) &lt;= 4000000)
          {
              c = a + b;
              if (c%2 == 0)
              {
                  sum2 = sum2 + c;
                  cout &lt;&lt; c &lt;&lt; endl;
              }
          }
      }
  
      cout &lt;&lt; "The sum of even fibonacci numbers not greater than 4 million is: " &lt;&lt; (sum1 + sum2); //Not being executed
      return 0;
  }
  </code></pre>