The numbers in the sequence
1, 1, 2, 3, 5, 8, 13,...
are known as Fibonacci numbers. Can you work out what the next term is, before looking at the generating equation below? Fibonacci numbers are defined by the relationship
Fn= Fn−1+ Fn−2.
Starting with F0= F1= 1 gives the sequence above. Write a program to put the first 30 Fibonacci numbers into an array f[0], f[1], . . . . Print out the array to check that your program works correctly.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here