Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  distance bw two points
Language: C/C++
Code:
#include<stdio.h>
#include<math.h>
main()
{
int x1,x2.y1,y2;
float D;

printf("enter coordinates");
scanf("%d%d%d%d",&x1,&x2,&y1,&y2);

D=sqrt((x1-x2)*(x1-x1)+(y1-y2)*(y1-y2));

printf("distance between two points=%f",D);

return 0;
}
          
Comments: