Question: Java: public static long fibby(long n){ if (n==0){ return 1; } return fibby(n/4)+fibby(3*n/4); public static void tablegen(int start,int end){ long answer = fibby(start); System.out.println(start+ +answer);

Java:

public static long fibby(long n){ if (n==0){ return 1; } return fibby(n/4)+fibby(3*n/4);

public static void tablegen(int start,int end){ long answer = fibby(start); System.out.println(start+" "+answer); if(start !=end) { tablegen(start+1,end); }

For sparsetablegen(13, 20), expected: 13 15 15 18 16 21 20 24

got: 13 15 14 15 15 18 16 21 17 21 18 21 19 21 20 24

I need helping changing ONLY tablegen to display the results in "got: " and keep it as only (int start, int end) and can not using any for or while loops.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!