How Prolog Can Do Arithmetic

All of the following examples can be run through your favorite Prolog interpreter, using cut and paste from this page, or you can download the whole Prolog file here. They are guaranteed to work with Quintus Prolog 3.2.

Click here to start.