Reputation: 173
I have this function:
:- use_module(library(random)).
choose(A, C, B) :- B is random(A), (B\=2, choose(A,C,B));(B == 2, !).
How can I make this function generate numbers from 0 to A, different from C and save the result in B?
Thanks.
Upvotes: 2
Views: 249