Advertisement
deced

Untitled

Dec 23rd, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.51 KB | None | 0 0
  1. var
  2.     I, M: Integer;
  3.     X, H, A, B, Fx: Real;
  4.     t: Text;
  5.  
  6. begin
  7.     assign(t, 'out.txt');
  8.     rewrite(t);
  9.     M := 15;
  10.     A := Pi / 4;
  11.     B := Pi / 2;
  12.     writeln('    Xi', '| ', '  Fx ', '| i| ');
  13.     writeln(t, '    Xi', '| ', '  Fx ', '| i| ');
  14.     H := (B - A) / M;
  15.     for I := 1 to M do
  16.     begin
  17.         X := X + H;
  18.         Fx := 1 / tan(sqrt(X));
  19.         writeln(X:6:2, '|', Fx:6:2, '|', I:2, '|');
  20.         writeln(t,X:6:2, '|', Fx:6:2, '|', I:2, '|');
  21.  
  22.     end;
  23.     close(t);
  24. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement