Answer:
The base case condition should be (x <= 0) instead of (x = = 0)
Step-by-step explanation:
The given recursive function works fine for positive number. However, it returns an error when the value passed to the function is negative.
To prevent this, the base case should be x <= 0.
This will allow the program returns 0 if a negative number or 0 is passed to the function.
Hence, the changes to be made is to replace the base case with x <= 0