Advertisement
deced

Untitled

Dec 23rd, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.53 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.     I := 1;
  16.     while (I <= M) do
  17.     begin
  18.         X := X + H;
  19.         Fx := 1 / tan(sqrt(X));
  20.         writeln(X:6:2, '|', Fx:6:2, '|', I:2, '|');
  21.         writeln(t, X:6:2, '|', Fx:6:2, '|', I:2, '|');
  22.         inc(I);
  23.     end;
  24.     close(t);
  25. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement