Distance Between 2 Places
Premium Content - Free Preview
You're creating travel software, and need to calculate the distance between 2 locations located at (x1, y1) and (x2, y2) on a 2D grid. You will be given a list of doubles as input in the following order: x1, y1, x2, y2. Calculate and print the distance between the cities, rounded to 3 decimal places.