1. Engineering
  2. Computer Science
  3. im having trouble coding this as a function i have...

Question: im having trouble coding this as a function i have...

Question details

Im having trouble coding this as a function. I have a bit of an idea how to do it normally but have no idea how to do it as a function. Please help ASAPCode the following functions using NON-RECURSIVE ITERATION test them by calling them from a simple interactive main menu with different values; For each function write both function PROTOTYPE and DEFINITION for every function. You MUST completely document every function following this basic format: Function fun2(n) is defined as follows: i-1 3. Fibonacci(n) Fibonacci(n-1) + Fibonacci(n-2); where n is a positive integer n >-0 and Fibonacci(1) - 1; Fibonacci(0) - 0; 4. The gretest common divisor gcd(x,y) where gcd(x, y) - x, if y-o otherwise gcd(x, y) = gcd(y, x MOD y), if y > 0 5. The function Power(a, b), where Power (2,4)2 *2 * 2 2 6. A function to display (print) that displays al1 the positive integers that are less than the value of n and divdisable by m, where m n 7. DrawTriangle(n); Would display one on the first line, then one more each line until it displays a line with n *s. Example: DrawTriangle(4) would display: k *

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution