Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <conio.h>
- int main ()
- {
- float a,b,f,x;
- int m,n;
- {
- printf("Set the interval [a,b] \n");
- scanf("%f %f",&a,&b);
- printf("Enter step \n");
- scanf(" %d",&m);
- x=a;
- n=1;
- printf(" Function f(x)=2tg(x/2)+1 \n");
- printf("------------------------------------------------\n");
- printf("| n | x | f(x) |\n");
- while(x<=b)
- {
- 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(" ");
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement