Help with calculating inheritance
From: harry270768 (harnit_b_at_mail.com)
Date: 05/12/04
- Next message: flapper: "Re: output **no What's wrong here?"
- Previous message: Steven M. Haflich: "Re: Source Code"
- Next in thread: Bill Spight: "Re: Help with calculating inheritance"
- Reply: Bill Spight: "Re: Help with calculating inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 May 2004 00:25:00 -0400
hi guys
subinheritance(Person,Amount):-
(aunt(Person,Dummy),hold_degree(Dummy,phd) ->
(Amount is 3000);Amount is 0).
given the following rule
Assume aunt(john,X)?
gives X=cassy
and X=linda
hold_degree(cassy,phd).
hold_degree(linda,phd).
My problem is for example if john has 2 aunts and they both have a phd
degree then john should get $3000 for each aunt.
therefore subinheritance(john,X)?
shud give X=6000
Now i cant figure out how to do this , coz what i have done is it just
gives me X=3000
So how do you loop for every aunt and then get the total ??
please help !!!!
thanx
- Next message: flapper: "Re: output **no What's wrong here?"
- Previous message: Steven M. Haflich: "Re: Source Code"
- Next in thread: Bill Spight: "Re: Help with calculating inheritance"
- Reply: Bill Spight: "Re: Help with calculating inheritance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|