QUESTIONS FIVE (5) A. Note the algorithm below: Int fun1 (int x) If ( x


QUESTIONS FIVE (5)<br>A. Note the algorithm below:<br>Int fun1 (int x)<br>If ( x < 5)<br>Return ( 3 * x)<br>Else<br>Return ( 2 * ( x – 5 ))<br>What is the value returned by the following function:<br>a. Fun1 ( 4 ) =<br>b. Fun1 ( 10 ) =<br>c. Fun1 ( 12 ) =<br>B. Given the function Fibonaci () as below:<br>Given:<br>Fibonacci (0) = 0<br>Fibonacci (1) = 1<br>Then<br>Fibonacci (n) = Fibonacci (n-1) + Fibonacci (n-2)<br>Draw a diagram for the implementation of the function Fibonacci (4).<br>

Extracted text: QUESTIONS FIVE (5) A. Note the algorithm below: Int fun1 (int x) If ( x < 5)="" return="" (="" 3="" *="" x)="" else="" return="" (="" 2="" *="" (="" x="" –="" 5="" ))="" what="" is="" the="" value="" returned="" by="" the="" following="" function:="" a.="" fun1="" (="" 4="" )="b." fun1="" (="" 10="" )="c." fun1="" (="" 12="" )="B." given="" the="" function="" fibonaci="" ()="" as="" below:="" given:="" fibonacci="" (0)="0" fibonacci="" (1)="1" then="" fibonacci="" (n)="Fibonacci" (n-1)="" +="" fibonacci="" (n-2)="" draw="" a="" diagram="" for="" the="" implementation="" of="" the="" function="" fibonacci="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here