User Profile
Collapse
-
Thanks for the help. That makes sense. I figured I was going down the wrong path. My text book touches on recursion briefly, but never had any examples like the one depicted. -
OK, the first part is easy if both values equal each other or the second value equals 1 than "1" is returned until some other values are inputed until the "else" is run.
So lets say the values are 4 and 2
(m-1,n-1) + n*func1(m-1,n)
(3,1) + 2*func1(3,2)
since there's no space between the comas which isn't normally done in Java, I assume the're multiplied.
(3) + 2*func1(6)
(3) + 2*4, 2(6)...Leave a comment:
-
Help with func
I’m taking an online course in Java programming and one of the problems on my open book test is to find the values of func1
The thing is I can’t find this anywhere in my text book, and I haven’t had any algebra in 10 years. (if it is indeed algebra and I'm going off on a...Code:Private int func1(int m, int n) { If (m==n || n==1) Return 1; Else Return func1(m-1,n-1) + n*func1(m-1,n); }
No activity results to display
Show More
Leave a comment: