//递归的算法
private int fat(int b){
//递归的特点就是要找到出口
if(b == 2 || b == 1 ){
return 1;
}
return fat(b-1) + fat(b-2);
}
//迭代的方法
public static void ff(int index){
int a = 1;
int b = 1;
int c = 0;
int i = 0;
while(i < index ){
c = a + b;
a = b;
b = c;
System.out.println(c);
i ++ ;
}
}