public class Fibonacci {
	public static void fiboI (int n) {
		int f1 = 1;
		int f2 = 1;
		int temp;
		System.out.print (f1+" "+f2+" ");
		
		for (int i=3; i<=n; i++) {
			temp = f1+f2;
			System.out.print (temp+" ");
			f1 = f2;
			f2 = temp;
		}
	}
	
	public static int fiboR (int n) {
		if (n==1 || n==2)
			return 1;
		return fiboR(n-1)+fiboR(n-2);
	}
	
	public static int fiboR (int n, boolean b) {
		if (n==1 || n==2)
			return 1;
		int f1 = fiboR(n-1,b);
		int f2 = fiboR(n-2,false);
		if (b)
		   System.out.print(" "+(f1+f2));
		return f1+f2;
	}
}
