Advertisement
Rimifawfaw

class 9/10 er valoi kothin wala piece of cake

Nov 25th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. double x, y,z;
  6. int t,i;
  7. cin>>t;
  8. for(i=1;i<=t;i++)
  9. {
  10. double sum=0;
  11.  
  12. cin>>x>>y>>z;
  13. double cosa = cos(z * acos(-1) / 180.0)*2*x*y;
  14. //cout<<cos(z)<<endl;
  15. double b = sqrt((pow(x,2)+pow(y,2))-cosa);
  16.  
  17. double ac = sqrt(2*((y*y)+(b*b))-(x*x));
  18. sum = x*x + ac*ac;
  19. printf("%.9lf\n",sum);
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement