Re: Calculator on list
- From: kabum <r.kabulski@xxxxxxxxx>
- Date: Sun, 2 Dec 2007 12:00:49 -0800 (PST)
I'm trying change my code to not div by zero but I'cant do it. And I
have other problem.
When I put on the list
[2,+,3,*,6] then
W = 2+3*6
X = 20 and this is OK,
but when I put on the list
[2,*,3,+,6] then
W = 2*(3+6)
X = 18 and this is bad because X = 12.
I don't know how do it to work good...
.
- Follow-Ups:
- Re: Calculator on list
- From: Chip Eastham
- Re: Calculator on list
- Prev by Date: comp.lang.prolog Frequently Asked Questions
- Next by Date: Re: Calculator on list
- Previous by thread: comp.lang.prolog Frequently Asked Questions
- Next by thread: Re: Calculator on list
- Index(es):