For Programmers: Free Programming Magazines  


Home > Archive > Prolog > April 2007 > pls help me i am beginner pls help in getting it









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author pls help me i am beginner pls help in getting it
jaya chandra

2007-04-18, 7:04 pm

?- everyother([3,4,11,0,9,19],X).

X = [3, 11, 9] ;

No
?- everyother([2,99,3,4,11],YY).

YY = [2, 3, 11] ;

No
?- everyother([33],Y).

Y = [33] ;

No
?- everyother([],ZZZ).

ZZZ = [] ;

No
?- everyother(A,[4,5,6,7]).

A = [4, _G234, 5, _G240, 6, _G246, 7] ;

A = [4, _G234, 5, _G240, 6, _G246, 7, _G252] ;

No
?- everyother(A,[]).

A = [] ;

No
?- everyother(A,[b]).

A = [b] ;

A = [b, _G216] ;

No
?-
Note: If you are getting the correct answer more than once when you
press the semicolon, see if you can remove some cases from your file.
Redundant cases can create multiple paths to the same solution.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com