Challenge: Calculate Distance Between Two Points
This challenge will test your knowledge of structs.
We'll cover the following...
Problem Statement
-
A struct
Point
is given which has two items,x
andy
. -
The function
test
is given which has two instances of points initialized with some value ofx
andy
. -
The task is to calculate the distance between the two points.
The distance between two points is: ...