Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- double x, y,z;
- int t,i;
- cin>>t;
- for(i=1;i<=t;i++)
- {
- double sum=0;
- cin>>x>>y>>z;
- double cosa = cos(z * acos(-1) / 180.0)*2*x*y;
- //cout<<cos(z)<<endl;
- double b = sqrt((pow(x,2)+pow(y,2))-cosa);
- double ac = sqrt(2*((y*y)+(b*b))-(x*x));
- sum = x*x + ac*ac;
- printf("%.9lf\n",sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement