Question: 3. Do the following problems: a. Write in ASL at least one procedure and a test driver to implement the following pseudo-code for the Fibonacci

3. Do the following problems: a. Write in ASL at least one procedure and a test driver to implement the following pseudo-code for the Fibonacci sequence: Fib(1) = 1; Fib(2) = 1; Fib(N) = Fib(N-1) +Fib(N-2), N > 2. b. Write in ASL at least one procedure and a test driver to implement the following pseudo-code for calculating the GCD (greatest common divisor) of two positive integers, M and N. function GCD(M: integer, N: integer): integer if (n=0) then return M;} else f remainder = M mod N; return GCD(N, remainder); c. Write in ASL at least one procedure and a test driver to implement a string reversal application. Eg, given the string: "Mayfair", returns: "riafyaM". The input strings are stored as NULL terminated, and the address of a string, or string array location can be passed on the stack. d. (Extra Credit). Extend to code in (c) to implement an app that checks if an input string is a palindrome. For example: "abba" reversed is still "abba", and is called a palindrome
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
