about | help | code help+videos | done | prefs |
Write a method that returns the highest Fibonacci number that is less than to the integer input parameter. Remember that Fibonacci numbers follow the pattern 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc. Notice that the first two Fibonacci numbers are both 1. To find any other Fibonacci numbers, just add the two previous numbers. For example, 13+21=34. lowFib(2) → 1 lowFib(11) → 8 lowFib(44) → 34 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy