
Alberto F. answered 05/29/20
Software Engineer with a Bachelors in Computer Science
What is important here is the base case of (x > 1000)
because the recursive call will continue to be called and increment x by 5 each time. We meet the base case condition when x == 1001 and it is returned with -4. That equals 997.