fork download
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<cmath>
  4.  
  5. using namespace std;
  6. int main(){
  7. int x1, y1,x2,y2;
  8. cin>>x1>>y1>>x2>>y2;
  9. double kc=sqrt(pow(x2-x1,2)+pow(y2-y1,2));
  10. cout<<fixed<<setprecision(2);
  11. cout<<kc<<endl;
  12.  
  13. return 0;
  14. }
  15.  
  16.  
Success #stdin #stdout 0.01s 5284KB
stdin
1
5
5
6
stdout
4.12