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;
- for I := 1 to M do
- begin
- 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, ' |');
- end;
- close(t);
- end.
Add Comment
Please, Sign In to add comment