How can you tell the program tha variable X is has a certin type ...
This is actually the problem ...
3. Define a predicate is_between(X , Y , N) meaning "N is between X and Y" and working like in the example below (there is a predefined PROLOG predicate called between that has the same behavior):
?- is_between(1,5,3).
Yes
?- is_between(1,5,7).
No
?- is_between(1,5,N).
N = 1 ;
N = 2 ;
N = 3 ;
N = 4 ;
N = 5 ;
No
ps: i'm a newbie .. if you didn't noticed
This is actually the problem ...
3. Define a predicate is_between(X , Y , N) meaning "N is between X and Y" and working like in the example below (there is a predefined PROLOG predicate called between that has the same behavior):
?- is_between(1,5,3).
Yes
?- is_between(1,5,7).
No
?- is_between(1,5,N).
N = 1 ;
N = 2 ;
N = 3 ;
N = 4 ;
N = 5 ;
No
ps: i'm a newbie .. if you didn't noticed