Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define int long long
- #define endl "\n"
- #define pb push_back
- #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- #define IN freopen("input.txt","r",stdin);
- #define OUT freopen("output.txt","w",stdout);
- const int N = 2e5 + 5;
- const double pi = acos(-1);
- int32_t main()
- {
- IOS;
- cout << fixed << setprecision(8);
- double a,b,c;
- double r=0,area=0,side=0,peri=0,h=0;
- cin >> a >> b >> c;
- r = (c*pi)/180;
- area = (a*b*sin(r))/2;
- side = sqrt(a*a + b*b - 2*a*b*cos(r));
- peri = a+b+side;
- h = b*sin(r);
- cout << area << endl << peri << endl << h << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment