//Program to Calculate the Distance between two Co-Ordinates
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float x1,x2,y1,y2,d;
clrscr();
printf("Enter the co-ordinates of the two Points\n");
scanf("%f%f%f%f",&x1,&x2,&y1,&y2);
d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
printf("The Distance between two Points is = %f",d);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float x1,x2,y1,y2,d;
clrscr();
printf("Enter the co-ordinates of the two Points\n");
scanf("%f%f%f%f",&x1,&x2,&y1,&y2);
d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
printf("The Distance between two Points is = %f",d);
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
Love yourself first and everything else falls into line. You really have to love yourself to get anything done in this world. See the link below for more info.
ReplyDelete#really
www.inspgift.com
measures distances in projected units in projected data, and geodesic distances only for data displayed in geographic lat/long distance between USA cities. If you hold down the shift key while measuring a distance,
ReplyDeleteVery valuable information. Thanks to share this valuable code. You can check Distance Between Two Cities here.
ReplyDeleteI'd like this great article content pieces, Get loved, Appraisal give preference to way more material applying, considering it is especially enticing., Bless most people developed for penning. distance calculator UK
ReplyDelete