For Programmers: Free Programming Magazines  


Home > Archive > Prolog > September 2004 > for problem









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 for problem
sachin786

2004-09-27, 3:56 am

hi all..
i wanted to add 10 number using for predicate ..i m not able
to do it...please help me i am newbie in prolog....


David Vago

2004-09-27, 9:00 am

Hi!

for(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10, Sum) :-
Sum is X1+X2+X3+X4+X5+X6+X7+X8+X9+X10.

Dave

"sachin786" <sachinsb@cse.iitb.ac.in> wrote in message
news:35ba954a19d873d58dd3b4c87660e7a3@lo
calhost.talkaboutprogramming.com...
> hi all..
> i wanted to add 10 number using for predicate ..i m not able
> to do it...please help me i am newbie in prolog....
>
>



Sponsored Links







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

Copyright 2008 codecomments.com