Quote:
3. Write an iterative Java method that is passed two non–negative integer numbers m and n as parameters,
and multiplies the two numbers by consecutive additions. The method should return the product m∗n.
4. Write the same method as above, but use recursion instead of iteration.
Quote:
Write a recursive method to solve Ackermann’s Function assuming non–negative integers as input. Ackermann’s function is a that solves the following mathematical recurrence function:
n + 1 if m = 0 A(m, n) = A(m − 1, 1) if m > 0 and n = 0 A(m−1,A(m,n−1) ifm>0andn>0
NOTE: This recurrence relation grows extremelly rapidly, so test it using small m and n values (≤ 4).
Doesnt print results; here is my code: