0 votes 0 votes find the output for A(6) A(n) { if (n<1) return 1; else return A(n-2)+B(n-1) } B(n) { if(n<=1) return 1; else return B(n-1)+A(n-2) } eyeamgj asked Jun 20, 2018 edited Jun 20, 2018 by eyeamgj eyeamgj 492 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments eyeamgj commented Jun 20, 2018 reply Follow Share i m also getting 16 but answer printed was 21 ......i think 21 is wrong 0 votes 0 votes Shaik Masthan commented Jun 20, 2018 reply Follow Share if you replace base condition in B as if ( n < 1 ) like in A then ans is 21 0 votes 0 votes eyeamgj commented Jun 20, 2018 reply Follow Share oh yes thanks for improvisation . 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes ans is 16 Anil Ji answered Jun 20, 2018 Anil Ji comment Share Follow See all 0 reply Please log in or register to add a comment.