mmf1102
mmf1102

Reputation: 61

Prolog Flight Paths

I am working on a homework, and have it pretty much done. Easiest CS homework I've done in recent memory. It's to write a Prolog program to find flight paths between different cities. So

oneStop(X,Y)

will find if the two cities have one stop between them, and so on for two, three, and four stops, as well as

 flightExists(X, Y) 

which finds if a paths exists in general. They all work great except that the output I get doesn't list out the entire flight path, only whichever X/Y I replace with the variable. How do I list out all the cities in between?

Upvotes: 0

Views: 437

Answers (0)

Related Questions