Hi,
I need to write a rule to find all the factors of a given number, this is that i have so far:
% "divisible without remainder function"
dwr(X, M) :- 0 is X mod M.
factors_of(X):-
D is 1,
findfactors(X, D).
findfactors(X, D):-
D = X,
F is X / D,
write(F).
findfactors(X, D):-
D < X...