•
Contents
•
Up
•
Test
•
The distance between two points (
u
,
v
) and (
x
,
y
) in the plane is sqrt((
u
-
x
)
2
+ (
v
-
y
)
2
). Write a definition of function distance(
u
,
v
,
x
,
y
) that produces the distance between points (
u
,
v
) and (
x
,
y
).
Answer
Store
Compute
[
Language:
Cinnameg
Kind:
function definition*]
(*You can define more than one function if you put a semicolon between definitions (but not between cases of one definition). Be sure to define a function before you use it.)