Solver Distance Formula to determine length on coordinate plane
Algebra
->
Tutoring on algebra.com
-> Solver Distance Formula to determine length on coordinate plane
Log On
Tutoring Home
Tutoring
For Students
For
Tools for Tutors
Tools
Our Tutors
Our
Register
Register
Recently Solved
Recently
Source code of 'Distance Formula to determine length on coordinate plane'
This Solver (Distance Formula to determine length on coordinate plane)
was created by by
pirategirl(1)
:
View Source
,
Show
,
Put on YOUR site
About pirategirl
:
==section input Find distance between 2 points with the coordinates: x1 *[input x1=0] y1 *[input y1=0] x2 *[input x2=1] y2 *[input y2=1] You may enter negative numbers for negative coordinates. ==section solution perl my $soln = sqrt(($x2-$x1)*($x2-$x1)+ ($y2-$y1)*($y2-$y1)); print "The distance (d) between two points is given by the following formula: {{{d=sqrt((x2-x1)^2 + (y2-y1)^2)}}} Thus in our case, the required distance is {{{d=sqrt(($x2-$x1)^2 + ($y2-$y1)^2)= $soln }}} For more on this concept, refer to <A HREF=Distance_formula.wikipedia>Distance formula</A>. "; ==section output soln, ==section check x1=-2 y1=-6 x2=-7 y2=1 soln,= x1=-2 y1=-6 x2=-7 y2=1 soln,= x1=0 y1=0 x2=3 y2=4 soln=5