Hey there guys,
I am doing some exercises in my study book for uni and have just started recursion. One of the exercises is use recursion to multiply 2 numbers using repeated addition.
The formula is: M x N = N + (M-1) x N
and the stopping case is 1 x N = N
the exercise says to create a function
int multiply(int m, int n)
I understand the general idea of recursion but am having trouble translating this into code.
Could some one show me how to create the recursive function and just explain the steps they used.
Any help would be great