The Fibonacci numbers are a sequence of numbers where each number is the sum of the two preceding numbers. This program uses a For statement. It also declares and uses variables to hold the previous two numbers in the sequence, so that they can be added to produce the next number in the sequence.
Fibonacci was a clever guy
http://en.wikipedia.org/wiki/Fibonacci
Without him, we would be doing all our math in roman numerals. The arab world developed our number writing system, and Fibanacci helped spread the technique.
Here is a bit on the Fibonacci number system, which he didn't invent, but is named after him:
http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibnat.html
http://mathworld.wolfram.com/FibonacciNumber.html
- Code the program
- Make it work
- Customize the program
- For example, have it print out in equation form, rather than just showing the resulting numbers.
- Have it show more than the first 18 numbers in the string.
- Check your numbers against an online listing of the Fibonacci numbers.
- Add a section to your daily log explaining what you do with this code and what it shows you.
- You may add a screenshot of your results to demo what you accomplished.
Here is the code (right click on it and choose View Image to see it full size in Mozilla)
Comments (0)
You don't have permission to comment on this page.