Computer Programming                                                                                 Name -
ACSL - Recursive Functions Worksheet #2                                                   Period -

Evaluate the following.   Label and show your work on attached paper.

k(x) = {    [k(x + 1) + x        if x <5
          {     x2                       if x >= 5

1.    k(2) =

 


2.    k(8) =


3.   k(-2) =
 


m(x, y) = {    m(x - 1, y - 2) + xy     if x >= 5 And y >= 0
               {    x + y                           if x < 5 Or y < 0

4.    m( 7, 1) =

 


5.    m(3, 3) =
 


n(x, y) = {    n(x - 1, y - 1) + 1     if x > 3
              {    x2  + y2                   if x <= 3

6.    n(5, 4) =
 




p(x, y) = {    p(x - 2, y - 2) + 2         if x > 5
              {    p(y - 1, x - 1) + 3         if 0 < x <= 5
              {    3                                  if 0 <= 0

7.    p(10, 9) =