Question: Java Problem A Fibonacci number is a number in the sequence 1,1,2,3,5,8,13,21, Note that first two Fibonacci numbers are 1 and any number other than

Java Problem

A Fibonacci number is a number in the sequence 1,1,2,3,5,8,13,21, Note that first two Fibonacci numbers are 1 and any number other than the first two the sum of the previous two Fibonacci numbers, for example 2-1 + 1,3-2+1,5-3+2 and so 0n.

write a function named IsFibonacci that returns 1 if its integer arguments is a Fibonacci number otherwise it returns 0.

the signature of the function is

int isFibonnaci(int n)

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!