Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- #include "math.h"
- #include "iostream"
- #include "conio.h"
- #include "iomanip"
- #include <locale.h>
- using namespace std;
- double y(double, double);
- int main()
- {
- setlocale(LC_ALL, "Rus");
- double kol, x, a;
- kol = 0;
- cout << "Введите a\n";
- cin >> a;
- if (cin.fail())
- {
- cout << "Неправильное значение \n";
- _getch();
- return 0;
- }
- printf("________________________________________________________________\n");
- printf("| N | x | y | a | \n");
- printf("|-----|---------------|---------------|------------------------|\n");
- for (x = -0.9; x <= 12.6; x = x + 1.5)
- {
- if (3*x && a - tan^a(x/2) != 0)
- printf("| %3.f |\t%12.1f | %13.6f | %17.9f |\n", kol, x, y(a, x), a);
- else printf("| %2.f |\t%13.1f | Нет решения | %18.9f |\n", kol, x, a);
- ++kol;
- }
- printf("\----------------------------------------------------------------\n");
- _getch();
- return 0;
- }
- double y(double a, double x)
- {
- return (3 * x)/(a - tan^a(x / 2));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement