title: Cannot be resolved to a variable error in Eclipse
body: <p>Trying to write a simple program that prints the Fibonacci sequence. I want to create a method named fibNumber that calculates the value of the Fibonacci sequence and then I want to use a for loop in the run() method to print that value 15 times. The trouble I'm having is the println method in the for loop. Eclipse says "n cannot be resolved to a value" and "i cannot be resolved to a value." I thought I covered all the bases in terms of declaring the variables. Am I missing something? <br/></p>
  
  <p>What I want to write is all the way up to F15 <br/></p>
  
  <p>F0 = 0 <br/>
  F1 = 1 <br/> 
  F2 = 1 <br/>
  F3 = 2 <br/>
  F4 = 3 <br/>
  F5 = 5 <br/></p>
  
  <pre><code>import acm.program.*;
  
  
  public class FiccononicSequence extends ConsoleProgram {
  
  public void run(){
      println("This program prints out the Fibonacci sequence.");
  
      for (i = 1; i &lt;= 15; i++){
  
          println("F" + i + " = " + fibNumber(n));
  
      }
  
  
  
  
  }
  
  
  private int fibNumber(int n){
      if (n == 0){
      return 0; 
      }else{ if (n == 1){
      return 1;
      }else{
      return fibNumber(n - 1) + fibNumber(n - 2);
  
  
  
  
  }      
  </code></pre>