PasteRack.org
Paste # 2944
2022-09-30 13:02:38

Fork as a new paste.

Paste viewed 470 times.


Embed:

  1. #lang racket
  2. (define (diffSquare a b)(expt(- a b)2))(define (distance x1 y1 x2 y2)(sqrt(+(diffSquare x2 x1)(diffSquare y2 y1))))
  3. (distance 1 2 7 10)

=>

10