Advertisement
matheusfreitag

1015

Dec 22nd, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main (){
  6.     int x1, x2, y1, y2;
  7.    
  8.    
  9.        
  10.     scanf ("%d %d", &x1, &y1);
  11.     scanf ("%d %d", &x2, &y2);
  12.    
  13.    
  14.     printf ("%.4f\n", sqrt((pow((x2-x1), 2))+(pow((y2-y1), 2))));
  15.    
  16.    
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement