gen(M,N,[M|Ns]):-M<N,M1 is M+1,gen(M1,N,Ns).
gen(N,N,[N]).

prvek(H,[H|_]).
prvek(X,[_|T]):-prvek(X,T).

cislo100(X):-gen(1,100,S), prvek(X,S).

trojuhelnik(X,Y,Z):- cislo100(X), cislo100(Y), cislo100(Z),
        XX is X*X, YY is Y*Y, ZZ is Z*Z, XXYY is  XX+YY, XXYY=ZZ .

vypis:-trojuhelnik(X,Y,Z),write(X),write(,), write(Y), write(,), write(Z),nl,fail.




