Advertisement
PedroSG

Untitled

Apr 7th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5.     float x1,y1,x2,y2,d;
  6.     scanf("%f %f",&x1,&y1);
  7.     scanf("%f %f",&x2,&y2);
  8.     d = sqrt(((x2-x1)*(x2-x1)) + ((y2-y1)*(y2-y1)) );
  9.     printf("%.4f\n",d);
  10.  
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement