Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. #include "stdio.h"
  2. #include "math.h"
  3. #include "iostream"
  4. #include "conio.h"
  5. #include "iomanip"
  6. #include <locale.h>
  7.  
  8. using namespace std;
  9. double y(double, double);
  10.  
  11. int main()
  12. {
  13. setlocale(LC_ALL, "Rus");
  14. double kol, x, a;
  15. kol = 0;
  16. cout << "Введите a\n";
  17. cin >> a;
  18. if (cin.fail())
  19. {
  20. cout << "Неправильное значение \n";
  21. _getch();
  22. return 0;
  23. }
  24. printf("________________________________________________________________\n");
  25. printf("| N | x | y | a | \n");
  26. printf("|-----|---------------|---------------|------------------------|\n");
  27. for (x = -0.9; x <= 12.6; x = x + 1.5)
  28. {
  29. if (3*x && a - tan^a(x/2) != 0)
  30. printf("| %3.f |\t%12.1f | %13.6f | %17.9f |\n", kol, x, y(a, x), a);
  31. else printf("| %2.f |\t%13.1f | Нет решения | %18.9f |\n", kol, x, a);
  32.  
  33. ++kol;
  34. }
  35. printf("\----------------------------------------------------------------\n");
  36. _getch();
  37. return 0;
  38. }
  39.  
  40. double y(double a, double x)
  41. {
  42. return (3 * x)/(a - tan^a(x / 2));
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement