#include <iostream> #include <cmath> using namespace std; int main () { int x1,x2,y1,y2,l; cout<<"x1="<<"y1="<<"x2="<<"y2="; cin>>x1>>y1>>x2>>y2; l=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); cout<<l; return 0; }
#include <iostream> #include <cmath> using namespace std; int main () { int x1,x2,y1,y2,l; cout<<"x1="<<"y1="<<"x2="<<"y2="; cin>>x1>>y1>>x2>>y2; l=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); cout<<l; return 0; }