I understand how the program work now with your explanation of what happen when a method call itself. Thanks you so much!
Type: Posts; User: maple1100
I understand how the program work now with your explanation of what happen when a method call itself. Thanks you so much!
I understand it when it it is replacing the value but what I don't understand is how the program take -5 + 8 without me adding the statement. Does the recursion record the value +2 each time it occur...
How can I make the computer display what it the value it seeing? I believe the computer are seeing value of x which are 17, 14,11, and 8.
Could someone help me understand this code? Thanks
So the program will print out
"Example 1: x = 20
20 > 10, therefore ... f(20) = f(20 - 3) + 2 = f(17) + 2
17 > 10, therefore ... f(17) =...