Guest User

Untitled

a guest
Apr 26th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. // ConsoleApplication4.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. double deg_to_rad(double deg)
  10. {
  11. double rad = tan(deg * 3.141592653589793 / 180.0);
  12. return rad;
  13. }
  14.  
  15. void main()
  16. {
  17. double k = 27.34;
  18. double l = 9.51;
  19. double a, b, x, y;
  20. cin >> x;
  21. a = (2 * l) - pow((2 * sqrt(x)), -4 / 3);
  22. b = k + cos(deg_to_rad(atan(deg_to_rad(1/x))));
  23. y = 0;
  24. cout << "a = " << a << endl;
  25. cout << "b = " << b << endl;
  26. y = a >= b ? asin(deg_to_rad(a + k*b)) : acos(deg_to_rad(b - a));
  27. cout << "y = " << y << endl;
  28. cin >> x;
  29. }
Add Comment
Please, Sign In to add comment