6 votes 6 votes What is the value of $F(4)$ using the following procedure: function F(K : integer) integer; begin if (k<3) then F:=k else F:=F(k-1)*F(k-2)+F(k-3) end; $5$ $6$ $7$ $8$ Algorithms isro2008 algorithms recursion identify-function + – go_editor asked Jun 13, 2016 edited Jun 10, 2020 by soujanyareddy13 go_editor 3.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 11 votes 11 votes Here f(1)=1 f(2)=2 f(4) = f(3)*f(2)+f(1) f(3)=f(2)*f(1)+f(0) =2*1+0=2 f(4)=2*2+1=5 srestha answered Jun 13, 2016 selected Jun 25, 2016 by Arjun srestha comment Share Follow See all 0 reply Please log in or register to add a comment.