#include
#include
using namespace std;
int main()
{
const int m=8;
int n[m] = {2,3,2,4,4,5,2,3},
h[m] = {4,5,12,3,10,11,10,6};
double a = 30*M_PI/180, H = 0;
for (int i=0; i < m; i++){
a = asin(sin(a)/n[i]);
H += h[i]*tan(a);
}
cout << "alfa = " << a*180/M_PI << endl;<br> cout << "H = " << H << endl;<br> system("PAUSE");
return 0;
}
Результат:
alfa = 0.00497359
H = 2.0175