Advertisement
deced

Untitled

Dec 24th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 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. repeat
  17. writeln('------------------');
  18. writeln(t,'------------------');
  19. X := X + H;
  20. Fx := sin(1/X);
  21. writeln(X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
  22. writeln(t,X:5:3, '|', Fx:6:2, ' |', I:2, ' |');
  23. I := I+1;
  24. until I > 15;
  25. close(t);
  26. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement