Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5 6 7 8 9
% Given an input number: factorial(0,1). factorial(N,F) :- N>0, N1 is N-1, factorial(N1,F1), F is N * F1.
...
-
1 2 3 4 5 6 7 8 9
countdown(X) :- number(X), X < 0. countdown(X) :- number(X), X>=0, write(X), nl, NX is X-1, countdown(NX).
-
1 2 3 4 5 6 7 8 9
% Given an input number: factorial(0,1). factorial(N,F) :- N>0, N1 is N-1, factorial(N1,F1), F is N * F1.
...
-
1 2 3 4 5
c(0):-!. c(X):- writef('%t',[X]), n1, succ(XN,X), c(XN).
-
1 2 3 4 5
c(0):-!. c(X):- writef('%t',[X]), n1, succ(XN,X), c(XN).
-
1 2 3 4 5
c(0):-!. c(X):- writef('%t',[X]), n1, succ(XN,X), c(XN).
-
1 2 3 4 5
count(0):-!. count(X):- writef('%t\z',[X]), succ(XN,X), count(XN).
-
1 2 3 4 5 6
% Given an input number: getInput(X). !.
-
1 2 3 4 5 6 7 8
:- use_module(library(writef)). count(0):-!. count(X):- writef('%t\n',[X]), succ(XN,X), count(XN).
-
1
hello_world :- write('Hello World!').
-
1
hello_world :- write('Hello World!') ,nl, fail.
-
1 2 3 4
program :- get_char(X),get_char(Y),check(X,Y). check('4','2'):-!. check(X,Y):-write(X),get_char(Z),check(Y,Z). :- program.
-
1 2 3 4 5 6
program :- write(s(X)). check('7', '2') :- !.
-
1 2 3 4 5 6
program :- write(s(X)). !.
-
1 2 3
program :- write(s(0)). :-.
-
1
program :- s(0).
-
1 2
program :- get_char(X),get_char(Y),check(X,Y). check(X,Y) :- !.
-
1
program :- get_char(X),get_char(Y),check(X,Y). check(X,Y) :- |
-
1
program :- get_char(X),get_char(Y),check(X,Y).
-
1
program :- get_char(X),get_char(Y),check(X,Y).
-
1 2 3 4
program :- get_char(X),get_char(Y),check(X,Y). check('4','2'):-!. check(X,Y):-write(X),get_char(Z),check(Y,Z). :- program.
-
1 2 3 4
program :- get_char(X),get_char(Y),check(X,Y). check('4','2'):-!. check(X,Y):-write(X),get_char(Z),check(Y,Z). :- program.
-
1 2 3 4
program :- get_char(X),get_char(Y),check(X,Y). check('4','2'):-!. check(X,Y):-write(X),get_char(Z),check(Y,Z). :- program.
-
1
even(X) := 0 is mod(X, 2).
-
1
oddeven(X) := 0 is mod(X, 2), write(even), nl.
-
1 2 3 4
ist_lieb(sandra). ist_guter_freund(X) :- ist_lieb(X). ?- ist_guter_freund(sandra).
-
1 2 3 4
ist_lieb(sandra). ist_guter_freund(X) :- ist_lieb(X). ?- ist_guter_freund(sandra).
-
1
program(ja).
-
1 2 3 4
ist_lieb(sandra). ist_guter_freund(X) :- ist_lieb(X). ?- ist_guter_freund(sandra).
-
1 2 3 4
ist_lieb(sandra). ist_guter_freund(X :- ist_lieb(X). ?- ist_guter_freund(sandra).


