I'm studying Java and I need to do a recursive Fibonacci program, but I have no idea how to do this. Please, if you know, help me. Here is an inductive code:
public static void main(String[] args) {
int n = 5, i = 0, a = 0, b = 1;
System.out.print( a + " " + b + " ");
while(i<=n){
int c = a + b;
System.out.print(c + " ");
a = b;
b = c;
i++;
}
}