Add example program for prime number detection
This commit is contained in:
parent
797660d6de
commit
a01e78a467
4
examples/prime.lp
Normal file
4
examples/prime.lp
Normal file
@ -0,0 +1,4 @@
|
||||
#show prime/1.
|
||||
|
||||
composite(I * J) :- I = 2..n, J = 2..n.
|
||||
prime(N) :- N = 2..n, not composite(N).
|
Loading…
Reference in New Issue
Block a user