Question: if i < 2, f(i) = i otherwise f(i) = f(i-1) - f(i-2) Find f(0) through f(9) Can anyone answer this in Java? My solution

if i < 2, f(i) = i otherwise f(i) = f(i-1) - f(i-2) Find f(0) through f(9) 

Can anyone answer this in Java? My solution is giving me f(0) = 0 and the rest all equal 1 but I know this is wrong. Thanks

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!