title: My Java implementation of the Fibonacci algorithm is not working.
body: <p>I am trying to write a Java program that produces the "nth" Fibonacci number.  What am I doing wrong?!  </p>
  
  <pre><code> public class project7 {
  
      public static void main(String[] args) {
          ConsoleReader console = new ConsoleReader(System.in);
  
          int fold1 = 1;
          int fold2 = 1;
  
  
          System.out.println("Enter the number of times you would like to compute:");
          int n = console.readInt();
  
          for(int i = 0; i &lt;= n; i++ ){
  
              fold1++;
              fold2++;
          }
  
          int fnew = fold1 + fold2;
          System.out.println(fnew);
  
      }
  }
  </code></pre>