https://github.com/ssekpius/microverse-students-sum-all-odd-fibonacci-numbers-ssekpius
return the sum of all odd Fibonacci numbers that are less than or equal to `num`. The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers
https://github.com/ssekpius/microverse-students-sum-all-odd-fibonacci-numbers-ssekpius
Last synced: 29 days ago
JSON representation
return the sum of all odd Fibonacci numbers that are less than or equal to `num`. The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers
- Host: GitHub
- URL: https://github.com/ssekpius/microverse-students-sum-all-odd-fibonacci-numbers-ssekpius
- Owner: SSEKPIUS
- Created: 2023-01-12T07:22:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T07:30:08.000Z (over 2 years ago)
- Last Synced: 2025-02-03T09:22:36.341Z (3 months ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sum All Odd Fibonacci Numbers
Given a positive integer `num`, return the sum of all odd Fibonacci numbers that are less than or equal to `num`.
The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers. The first six numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8.
For example, `sumFibs(10)` should return `10` because all odd Fibonacci numbers less than or equal to `10` are 1, 1, 3, and 5.
Submit a pull request to the main branch with your solution. Do not modify the tests. Once you have created a PR with passing tests, then you have successfully completed the exercise.
### Troubleshooting
If you cannot see any auto-grading workflows on the [Actions](../../actions) page, learn how to fix it in [this repo](https://github.com/microverse-students/autograding-troubles-js/blob/main/README.md).