Distance between two points P46254


Statement
 

pdf   zip   main.cc

thehtml

Using the definition

struct Point { double x, y; };

write a function

double dist(const Point& a, const Point& b);

that returns the euclidean distance between two points a and b.

Observation You only need to submit the required classes; your main program will be ignored. Strictly obey the type definitions of the statement.

Information
Author
Salvador Roura
Language
English
Translator
Carlos Molina
Original language
Catalan
Other languages
Catalan
Official solutions
C++
User solutions
C++