You are on page 1of 1

Cu 1:

nth_ele(1,[X|_],X).
nth_ele(N,[_|T],X):-M is N-1,
nth_ele(M,T,X).
Cu 2:

You might also like