Programming Tutorial (C / Windows/ Prolog)
CLOUD COMPUTING | DATA MINING | ARTIFICIAL INTELLIGENCE | APPLICATION PROGRAMMING IN C/C++/Java
Wednesday, May 4, 2011
PROGRAM TO PRINT Kth ELEMENT FROM LIST
extractk(X,[X|_],1).
extractk(X,[_|T],K):- K>1,K1 is K-1, extractk(T,X,K1).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment