#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{ float x1,y1,x2,y2,d;
cout<<"Enter coordinates (x1,y1)"<<endl;
cin>>x1>>y1;
cout<<"Enter coordinates (x2,y2)"<<endl;
cin>>x2>>y2;
d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
cout<<"distance is = "<<d;
getch();
}
No comments:
Post a Comment