title: Fibonacci sequence using a do-while loop in java?
body: <p>I am trying to print a <em>Fibonacci</em> sequence using a <code>do-while</code> loop in java and can't understand this.  Needs to be between 0 and 100.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>int prevPrevVal = 0;
  int prevVal = 1;
  int currVal;
  System.out.println(prevPrevVal);
  System.out.println(prevVal);
  
  do
  {       
      currVal = prevVal + prevPrevVal;
      System.out.println(currVal);
  
      prevPrevVal = prevVal;
      prevVal = currVal;          
  } while (prevVal &lt;= 100);
  </code></pre>