More Puzzles

   Log inLog in 
 
 RegisterRegister Immediately 

Difficult Logic Problems
Logic and Prolog

 
Fri Nov 27, 2009 11:04 pm  by JordanFalcon

Hi, i need your help to solve the following:

Write a prolog predicate mean/2 to compute the arithmetic mean of a given list of numbers. explain your answer.

?- mean([1,2,3,4],X)
X=2.5

Your help to solve this is appreciated.

Thanks-
Jordy
 
   
Reply to topic
      All times are GMT
Page 1 of 1

 
 



Discussion Board Forum Index