#include <stdio.h>
#include <cstdlib>
#include <math.h>
int main ()
{
double x1=1, y1=5, x2=4, y2=7, side1, side2, distance;
side1 = x2 - x1;
side2 = y2 - y1;
distance = sqrt(side1*side1 + side2*side2);
printf("the distance between the two points is:""%5.2f \n", distance);
system("pause");
return 0;
}
#include <cstdlib>
#include <math.h>
int main ()
{
double x1=1, y1=5, x2=4, y2=7, side1, side2, distance;
side1 = x2 - x1;
side2 = y2 - y1;
distance = sqrt(side1*side1 + side2*side2);
printf("the distance between the two points is:""%5.2f \n", distance);
system("pause");
return 0;
}
jorden008@