Home /
Expert Answers /
Computer Science /
programming-question-1-in-mathematics-the-fibonacci-numbers-commonly-denoted-fn-form-a-sequenc-pa936
(Solved):
Programming Question 1: In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequenc ...
Programming Question 1: In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, the Fibonacci sequence, in which each number is the sum of the two preceding ones. In the Chapter 4, we learned the top-down and bottom-up manner to solve a problem by using decrease by a constant technology. Please use the top-down (recursive manner) and bottom-up manner to write a program to calculate the value of Fn. 1): Feel free to use your familiar programming language. 2): You need to test your two programs by using 50 arbitrary numbers for each one and record the programming execution time for each test number. 3): Please submit source code and the record on above. 2: Try to implementation an insertion sort algorithm by using the pseudocode on page 15 of chapter 4. 1): Please use different arrays to test your program (At least 5). 2): Please submit source code and the screenshot of your test cases.
Answer 1: #include int f(int); int main() { int n, m= 0, i; printf("Enter Total terms:n"); scanf("%d", &n); printf("Fibonacci series terms are:n"); for(i = 1; i <= n; i++) { printf("%dn", fibonacci(m)); m++; } retu