Question: This is C programming 3. The Fibonacci sequence is commonly used in engineering applications such as sorting algorithm, system optimization and audio compression. The 9th

This is C programming
3. The Fibonacci sequence is commonly used in engineering applications such as sorting algorithm, system optimization and audio compression. The 9th Fibonacci sequence as below 0,1,1,2,3, 5, 8, 13,21 begins with the terms 0 and 1 and has the property that each succeeding term is the sum of the two preceding terms. For example, in the above 9th Fibonacci sequence, 2 is the sum of 1 and 1, 3 is the sum of 2 and 1, meanwhile 5 is the sum of 3 and 2, so on and so forth. a) Write a function called fibonacci) that calculates and return an integer-type array of the 9th Fibonacci sequence. (8 marks) b) Modify the function in 3(a) so that it can calculate and return a double- type array of n-th Fibonacci sequence. (7 marks) c) Using the function in 3(b), write a complete program that displays only odd numbers on screen and saves only even numbers to a file from the 12h Fibonacci sequence (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
