Write a recursive Prolog procedure triangle(M,N) that determines the number of balls N in a triangle with M balls in the bottom level. Each level has one ball fewer than the previous level. The top level (base case) contains only 1 ball.
executed all this commands, all of them do return true.Can you kindly please guide me using M and N, I can see that M=X and N=Y but I want to be relevant to the question.