Răspuns:
#include <iostream>
#include <cmath>
using namespace std;
double a,b,S,alfa,beta,ha,hb,d1,d2;
int main()
{
cout << "a="; cin >> a;
cout << "b="; cin >> b;
cout << "alfa="; cin >> alfa;
beta=180-alfa;
cout << "beta=" << beta << endl;
alfa=(4*atan(1))*alfa/180;
S=a*b*sin(alfa);
cout << "S=" << S << endl;
ha=S/a; hb=S/b;
cout << "ha=" << ha << endl;
cout << "hb=" << hb << endl;
d1=sqrt(a*a+b*b-2*a*b*cos(alfa));
d2=sqrt(2*(a*a+b*b)-d1*d1);
cout << "d1=" << d1 << endl;
cout << "d2=" << d2 << endl;
return 0;
}
Explicație: