I am in CodeLab for school, and have worked and worked on this problem without being able to figure it out. The question is:
Two non-negative integers x and y are equal if either:
Both are 0, or
x-1 and y-1 are equal
Write a bool -function named equals that recursively determines whether its two int parameters are equal and returns true if they are and false otherwise.
CodeLab says that the function is returning true whether the two parameters are equal or not. It says there is a logical error but I have not been able to find it, even after going over the function on paper.