Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <locale.h>
- #include <stdio.h>
- #include <math.h>
- #include <conio.h>
- int main()
- {
- float a, b, f, x;
- int m, n,i;
- {
- setlocale(LC_ALL, "RUSSIAN");
- printf("Функция [a,b] \n");
- scanf_s("%f %f", &a, &b);
- printf("Enter step \n");
- scanf_s(" %d", &m);
- x = a;
- n = 1;
- printf(" Function f(x)=2tg(x/2)+1 \n");
- printf("------------------------------------------------\n");
- printf("| n | x | f(x) |\n");
- for(i=0;i<b;i++)
- {
- f = 2 * tan(x / 2) + 1;
- printf("| %5d | %5.2f | %5.2f |\n", n, x, f);
- x = x + m;
- n = n + 1;
- }
- printf("------------------------------------------------\n");
- printf("\n");
- printf(" \n");
- scanf_s(" ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement