Skip to content

Instantly share code, notes, and snippets.

@Macorreag
Created May 29, 2019 17:31
Show Gist options
  • Save Macorreag/87f4c5ee6652f0c27c8babb2b8de2ff7 to your computer and use it in GitHub Desktop.
Save Macorreag/87f4c5ee6652f0c27c8babb2b8de2ff7 to your computer and use it in GitHub Desktop.
factorial en prolog
factorial(0,1).
factorial(N,M):-N>0, N1 is N-1,factorial(N1,M1),M is N*M1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment