How do I add variables together?

A topic you might find of value: Useful Prolog References


Also check out the site RosettaCode that has coding exmaples done in many programming languages. Here is a list of the Prolog examples: Category:Prolog - Rosetta Code