PasteRack.org
Paste # 68947
2019-04-04 20:49:14

Forked from paste # 78644.

Fork as a new paste.

Paste viewed 217 times.


Embed:

  1. #lang racket
  2. (define(volume-sphere radius)
  3.   (/ (* 4 3.14 radius radius radius) 3))
  4.  
  5.    (define (volume-shell inner-radius outer-radius)
  6.      (- (volume-sphere outer-radius) (volume-sphere inner-radius)))
  7.  
  8.    (volume-shell 1 2)

=>

29.306666666666665