Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<math.h>
- #include<stdio.h>
- using namespace std;
- int main()
- {
- int i,T;
- float x1, y1, x2, y2, ans, a, b;
- cin>>T;
- for(i=1;i<=T;i++)
- {
- cin>>x1>>y1>>x2>>y2;
- a = (x2-x1);
- b = (y2-y1);
- ans = sqrt(a*a+b*b);
- printf("Case %d: %.4f\n",i,ans);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement