78.3k views
1 vote
The Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, ......., where each number is the sum of the two preceding numbers. Write a program that declares an array of length 15 and fills the array with the first 15 Fibonacci numbers. Print the array to check if the array elements are correct. Use the sizeofoperator instead of 15 whenever you need to use the array length.

User Jlew
by
3.9k points

1 Answer

5 votes
0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597
User Snowcamel
by
4.5k points