title: Can't print all the numbers within a fibanocci series
body: <p>I'm trying to print fibanocci series within some give range. I've found the problem in my code but, i can't fix it.</p>
  
  <p>I have tried everything as per my knowledge</p>
  
  <pre><code>
  import java.util.*;
  
  class Fiba {
      public static void main(String args[]) {
          int v1 = 0;
          int v2 = 1;
          Scanner gump = new Scanner(System.in);
          System.out.print("enter the term :");
          int term = gump.nextInt();
          int result;
          int result1;
          int v3;
          System.out.print(v1 + "," + v2);
          while (term &gt; v2) {
              result = v1 + v2;
  
              result1 = result + v2;
              v1 = result;
  
  
              v2 = result1;
  
              if (v2 &lt; term) {
  
                  System.out.print("," + v1 + "," + v2);
  
              }
  
  
          }
  
      }
  }
  </code></pre>
  
  <p>The problem is , when the loop runs v2 is assigned to a bigger value than the term. so, it refuses to show complete series.I need a solution to print the all numbers in the series.</p>