Возведение числа в квадрат
#!/usr/lib/swi-prolog/bin/i386/pl -q -g main -s f(X,Y) :- Y is X*X. main :- f(2,Y), print(Y),nl, halt.