[
]
How can I write (using print_path ) a rule to print the path from one node to another, if exists
Print_path(a, c, Res)
What I've done:
path(a,b). %there is a path from a to b path(a,f). path(b,c). path(c,d). path(c,e). path(e,d). path(f,g). path(f,c). path(f,e).`
I do not know what to do next.
path member prolog shortest-path
fayez
source share