-1
I’m studying Java and I need to do a recursive Fibonacci program, but I have no idea how to do that. Please, if you know, help me. Here’s 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++;
}
}
Related: https://answall.com/q/177138/132
– Victor Stafusa
I think you should try to solve this problem on your own. It’s a simple problem. Did you ever study recursion? If you had any doubts about the recursion, I believe that in this case would fit a question. It seems you received the problem and placed it here in its entirety, showing no attempt at resolution.
– Fagner Fonseca
I am voting to close this question because as stated, there is no doubt about programming, but rather the resolution of your problem easily found on the internet
– Thiago Luiz Domacoski