Define a method to generate fibonacci number within the range
Answers
Answered by
0
I hope this answer will help you
Attachments:
Answered by
0
Given a range, count Fibonacci numbers in given range. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 141, ..
Example :
Input: low = 10, high = 100 Output: 5 There are five Fibonacci numbers in given range, the numbers are 13, 21, 34, 55 and 89. Input: low = 10, high = 20 Output: 1 There is only one Fibonacci Number, 13. Input: low = 0, high = 1 Output: 3 Fibonacci numbers are 0, 1 and 1
plz mark me as brain list
Example :
Input: low = 10, high = 100 Output: 5 There are five Fibonacci numbers in given range, the numbers are 13, 21, 34, 55 and 89. Input: low = 10, high = 20 Output: 1 There is only one Fibonacci Number, 13. Input: low = 0, high = 1 Output: 3 Fibonacci numbers are 0, 1 and 1
plz mark me as brain list
Similar questions