fork download
  1. // 1-10-A
  2. #include <stdio.h>
  3. #include <math.h>
  4. int main(void){
  5. double x1, y1, x2, y2, xdist, ydist;
  6. scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2);
  7. xdist = (x2-x1)*(x2-x1);
  8. ydist = (y2-y1)*(y2-y1);
  9. printf("%f\n", sqrt(xdist + ydist));
  10. return 0;
  11. }
Success #stdin #stdout 0s 2012KB
stdin
0 8 9 3
stdout
10.295630