Skip to content

Commit

Permalink
adding comments about how use the prolog
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielduuarte committed Oct 12, 2018
1 parent 5e67abe commit dcb8902
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions math/factorial/prolog/factorial.pl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
*
*/

%to run this, you use the swipl then you use, for exemple,
%factorial(5, X).
%this will print X = 120.
%Have fun!

%stopping criterion
factorial(0, 1) :- !.
Expand Down

0 comments on commit dcb8902

Please sign in to comment.