Skip to content

Instantly share code, notes, and snippets.

@trietptm
Created June 26, 2012 18:50
Show Gist options
  • Save trietptm/2997924 to your computer and use it in GitHub Desktop.
Save trietptm/2997924 to your computer and use it in GitHub Desktop.
Tính giá trị giai thừa của một số nguyên bất kỳ
giaithua(0, 1) :- !.
giaithua(X, Y) :- X1 is X-1, giaithua(X1, Y1), Y is X*Y1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment