Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main ()
  4. {
  5. int t,cs=1,ox,oy,ax,ay,bx,by;
  6. double oa,ob,ab,o;
  7. scanf("%d",&t);
  8. while(t--)
  9. {
  10. scanf("%d %d %d %d %d %d",&ox,&oy,&ax,&ay,&bx,&by);
  11. oa=((ax-ox)*(ax-ox))+((ay-oy)*(ay-oy));
  12. oa=sqrt(oa);
  13. ob=((bx-ox)*(bx-ox))+((by-oy)*(by-oy));
  14. ob=sqrt(ob);
  15. ab= ((bx-ax)*(bx-ax))+((by-ay)*(by-ay));
  16. ab= sqrt(ab);
  17. o=acos(((oa*oa)+(ob*ob)-(ab*ab)));
  18. cout<<"o angle is -- "<<o<<endl;
  19.  
  20.  
  21. }
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement