The task is: Determine that numbers A, B, Cn are divisible. For example: (a = 2, b = 3, c = 4, n = 2 is a, a, c).
Then, I have written the following code:
one (integer, integer) m (integer), integer, integer, integer) classes one (x, n): - 0 = x mode n, write (x). M (a, b, c, n): - a (a, n) m (a, b, c, n): - a (b, n). M (A, B, C, N): - A (C, N) Round M (2,3,4,2) But if Prolog got the solution first (my case One = 2) then it stops and displays it but, in my case the answer would be = 2, c = 4. My question is, "how can Prologue examine all the predictions"?