Like in other programming languages, decision statements in Prolog are If-Then-Else statements. We check a condition. If it is true, then a task is performed and if it false, another set of tasks is performed.
The syntax to use a decision statement in Prolog is,

To implement decision making, create a new file, write the instructions given below and save it as dm.pl.



Leave a Reply