PasteRack.org
Paste # 6662
2017-03-21 12:44:04

Fork as a new paste.

Paste viewed 46 times.


Embed:

  1. #lang racket
  2.  
  3. (define (areaOfCircle radius)
  4.    (* pi radius radius))
  5.  
  6.  
  7. (define (circumOfCircle radius)
  8.    (* 2 pi radius))
  9.  
  10.  
  11. (define (surfaceArea radius height)
  12.    (+   (* height (circumOfCircle(radius)))
  13.         (* 2(areaOfCircle radius))
  14.   ))
  15.  
  16. (surfaceArea 2 3)

=>

application: not a procedure;

 expected a procedure that can be applied to arguments

  given: 2

  arguments...: [none]