Advertisement
Guest User

Problem no.F

a guest
Oct 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include<math.h>
  3. #include<stdio.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int i,T;
  9. float x1, y1, x2, y2, ans, a, b;
  10. cin>>T;
  11. for(i=1;i<=T;i++)
  12. {
  13. cin>>x1>>y1>>x2>>y2;
  14. a = (x2-x1);
  15. b = (y2-y1);
  16. ans = sqrt(a*a+b*b);
  17. printf("Case %d: %.4f\n",i,ans);
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement