将大问题拆分成小问题
3.1 电影院利润问题
;; profit : number -> number ;; to compute the profit as the difference between revenue and costs ;; at some given ticket-price (define (profit ticket-price) ...)
;; revenue : number -> number ;; to compute the revenue, given ticket-price (define (revenue ticket-price) ...) ;; cost : number -> number ;; to compute the costs, given ticket-price (define (cost ticket-price) ...) ;; attendees : number -> number ;; to compute the number of attendees, given ticket-price
(define (attendees ticket-price) ...)

本文介绍了一种计算电影院利润的方法,通过定义利润、收入、成本及观众数量等函数来模拟不同票价情况下的经济效果。

584

被折叠的 条评论
为什么被折叠?



