The first column is the x-coordinates, the second column is the y coordinates. The distance is given by the formula
Write the output the a file named out.txt. Here is a sample output
The total distance is 175.03785106369511
You can assume
position.txt exists
the file is in correct format, i.e., every line has 2 numbers.