Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication4.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- double deg_to_rad(double deg)
- {
- double rad = tan(deg * 3.141592653589793 / 180.0);
- return rad;
- }
- void main()
- {
- double k = 27.34;
- double l = 9.51;
- double a, b, x, y;
- cin >> x;
- a = (2 * l) - pow((2 * sqrt(x)), -4 / 3);
- b = k + cos(deg_to_rad(atan(deg_to_rad(1/x))));
- y = 0;
- cout << "a = " << a << endl;
- cout << "b = " << b << endl;
- y = a >= b ? asin(deg_to_rad(a + k*b)) : acos(deg_to_rad(b - a));
- cout << "y = " << y << endl;
- cin >> x;
- }
Add Comment
Please, Sign In to add comment