Advertisement
deced

Untitled

Dec 24th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 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 / 8;
  11. B := 2 / pi;
  12. writeln(' Xi ', '| ', ' F(x) ', '| i | ');
  13. writeln(t, ' Xi ', '| ', ' F(x) ', '| i | ');
  14. H := (B - A) / M;
  15. I:=0;
  16. while I <= 15 do
  17. begin
  18. writeln('------------------');
  19. writeln(t,'------------------');
  20. X := X + H;
  21. Fx := sin(1/X);
  22. writeln(X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
  23. writeln(t,X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
  24. I := I+1;
  25. end;
  26. close(t);
  27. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement