title: Print fibonacci numbers up tp 15,000 C#
body: <p>I have seen similar questions(but in C) -- <a href="https://stackoverflow.com/questions/2170276/calculating-fibonacci-numbers-recursively-in-c">Calculating Fibonacci Numbers Recursively in C</a> about my issue.</p>
  
  <p>I am a bit stuck on how to keep on printing fibonacci numbers until it reaches about 40,000, in C# in my console application, How can I achieve this?</p>
  
  <p>E.G, I want the application to do this:</p>
  
  <pre><code>0
  1
  1
  2
  3
  5
  8
  
  and so on.
  </code></pre>
  
  <p>Thanks.
  I'd hate to say this, but I had a brainwave, and solved it!</p>
  
  <p>Here is what I did:</p>
  
  <pre><code>static void Main(string[] args)
  {
      int num1 = 0;
      int num2 = 1;
      int sum = 1;
      while (num1 &lt;= 15000)
      {
          sum = num1 + num2;
          num1 = num2;
          num2 = sum;
         Console.WriteLine(num2);
      }
      Console.ReadLine();
  }
  </code></pre>