fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. double dlugosc(int a, int b, int c, int d)
  4. {
  5. double x, y;
  6. x = a - b;
  7. y = c - d;
  8. return hypot(x, y);
  9. }
  10. int main()
  11. {
  12. double a, b, c, d;
  13. scanf("%lf%lf%lf%lf", &a, &b, &c, &d);
  14.  
  15. printf("%lf",dlugosc(a, b, c, d) );
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2296KB
stdin
3
0
4
0
stdout
5.000000