Question: Write a program that will: 1. Declare an array named fibs that can hold 30 integer numbers. 2. Write the code to compute and
Write a program that will: 1. Declare an array named fibs that can hold 30 integer numbers. 2. Write the code to compute and fill this array with the first 30 Fibonacci numbers. fibs[0]= 0, fibs[1] = 1, fibs[2] = 1, fibs[3] = 2, ..., fib[n] = fib[n - 1] + fib[n- 2] 3. Write the code to compute the sum of all the even numbers in fibs and store it in a location named sum. 4. Output the content of the location sum. Required I/O: Fibonacci by F. Last Sum = ?
Step by Step Solution
3.31 Rating (160 Votes )
There are 3 Steps involved in it
Sure heres a C program that implements the requested functionality ... View full answer
Get step-by-step solutions from verified subject matter experts
