Advertisement
rahat62

Toph-দুরত্ব নির্ধারণ

Jan 30th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include<math.h>
  3.  
  4. int main()
  5. {
  6.   double x1,x2,y1,y2,d;
  7.  
  8.   int t,i;
  9.   scanf("%d",&t);
  10.  
  11.   for(i=1;i<=t;i++)
  12.   {
  13.  
  14.   scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
  15.    d= sqrt(pow(x2-x1,2)+pow(y2-y1,2));
  16.  
  17.    printf("Case %d: %.4lf\n",i,d);
  18.  
  19.   }
  20.  
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement