Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- I, M: Integer;
- X, H, A, B, Fx: Real;
- t: Text;
- begin
- assign(t, 'out.txt');
- rewrite(t);
- M := 15;
- A := Pi / 8;
- B := 2 / pi;
- writeln(' Xi ', '| ', ' F(x) ', '| i | ');
- writeln(t, ' Xi ', '| ', ' F(x) ', '| i | ');
- H := (B - A) / M;
- I:=0;
- repeat
- writeln('------------------');
- writeln(t,'------------------');
- X := X + H;
- Fx := sin(1/X);
- writeln(X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
- writeln(t,X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
- I := I+1;
- until I > 15;
- close(t);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement