import java.io.*;
public class Prac_12 {
public static BufferedReader ent = new BufferedReader(new InputStreamReader(System.in));
public static int fib1(int x,int y, int c)
{
; System.out.print(x+", " ) ;
if (c<2)
return 1;
else
return fib2(y,(y+x),(c-1) ) ;
}
public static int fib2(int x,int y, int c)
{
System.out.print(x+", " ) ;
if (c<2)
return 1;
else
return fib1(y,(y+x),(c-1) ) ;
}
public static void main(String args[]) throws IOException{
System.out.println("Dame la cantidad de numeros para hallar: " ) ;
int n = Integer.parseInt(ent.readLine() ) ;
System.out.println("Recursivo es: " ) ;
fib1(0,1,n);
System.out.println("Fin!" ) ;
}
}
public class Prac_12 {
public static BufferedReader ent = new BufferedReader(new InputStreamReader(System.in));
public static int fib1(int x,int y, int c)
{
; System.out.print(x+", " ) ;
if (c<2)
return 1;
else
return fib2(y,(y+x),(c-1) ) ;
}
public static int fib2(int x,int y, int c)
{
System.out.print(x+", " ) ;
if (c<2)
return 1;
else
return fib1(y,(y+x),(c-1) ) ;
}
public static void main(String args[]) throws IOException{
System.out.println("Dame la cantidad de numeros para hallar: " ) ;
int n = Integer.parseInt(ent.readLine() ) ;
System.out.println("Recursivo es: " ) ;
fib1(0,1,n);
System.out.println("Fin!" ) ;
}
}