For Programmers: Free Programming Magazines  


Home > Archive > Scheme > March 2008 > Exercise 3.1.1









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 Exercise 3.1.1
fernandonaranjo67@gmail.com

2008-03-22, 10:31 pm

First, get the attendeees from the ticket value or "t"

(define (attendees t)
(+ 120 (* 15 (/ (- 5 t) .1))))
(define (revenue t)
(* t (attendees t)))
(define (cost t)
(+ 180 (* .04 (attendees t))))
(define (profit t)
(- (revenue t) (cost t)))
Jason

2008-03-23, 10:39 pm

fernandonaranjo67@gmail.com writes:

> First, get the attendeees from the ticket value or "t"
>
> (define (attendees t)
> (+ 120 (* 15 (/ (- 5 t) .1))))
> (define (revenue t)
> (* t (attendees t)))
> (define (cost t)
> (+ 180 (* .04 (attendees t))))
> (define (profit t)
> (- (revenue t) (cost t)))


Do you have a question?

--
-Jason
Sponsored Links







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

Copyright 2008 codecomments.com