UNB/ CS/ David Bremner/ teaching/ java/ FibTrace.java
public class FibTrace
{  public static void main(String[] args)
   {
       int f = fib(6,0);
   }

   /**
      Computes a Fibonacci number.
      @param n an integer
      @return the nth Fibonacci number
   */
    public static int fib(int n, int level){
        Trace.indent(level,"Entering fib("+ n+")");

        int f;
        if (n <= 2)
            f = 1;
        else
            f = fib(n - 1, level+1)
                + fib(n - 2, level+1);

        Trace.indent(level,"fib("+n+")= "+f);
        return f;
    }
}
//