Question: Hi! I need help in the following java programming question. I did some part but I'm confused in spacing part. Question: My code till now:
Hi! I need help in the following java programming question. I did some part but I'm confused in spacing part. Question:

My code till now:
import java.util.*;
public class fibonacci { static int count = 0;
public static void main (String args[]) { int n = 4; fib(n); } static int fib(int n) { for (int i = n; i Input Format one single valid java integer Constraints 0 1 is a stopping condition, so there is no more recursion at this point, we return to our method where n was 2. fibonacci(2) now recurses with fibonacci(2-2) -->0 is also a stopping condition, so we don't recurse any more. Note that the calls to fibonacci(1) and fibonacci(0) are at the same level of indentation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
