Declare and define the function distance() to find the Euclidean distance between the two points (x[0], y[0]) and (x[1], y[1]) in c -
declare , define function distance() find euclidean distance : √((x1 - x2)² + (y1 - y2)²) between 2 points (x[0], y[0]) , (x[1], y[1]) this function should calculate , homecoming answer.
c programme -----
double distance(double x[], double y[]) ;
what else supposed put. include eculidean distance in function or create new one?
double distance(double x[], double y[]);
is function declaration.
double distance(double x[], double y[]) { //write code here returns double }
is function definition.
looks problem wants both.
c euclidean-distance
No comments:
Post a Comment