You have an extra pair of parentheses around the "else" clause.
Bo Gus wrote at 10/22/2013 04:08 AM:
(define (tax pay)
(cond
((<= pay 240.0) 0)
((<= pay 480.0) (* (/ 15 100) pay))
((else ((+ (* (/ 15 100) 480) (* (/ 28 100) (- pay 480
Racket Users l
Using DrRacket v5.3.6, if I enter:
(define (tax pay)
(cond
((<= pay 240.0) 0)
((<= pay 480.0) (* (/ 15 100) pay))
((else ((+ (* (/ 15 100) 480) (* (/ 28 100) (- pay 480
I get error
else: not allowed as an expression in: (else ((+ (* (/ 15 100) 480) (* (/
28 100) (- pay 480)
2 matches
Mail list logo