Advertisement
Infra_HDC

help - 07-SEP-2019

Sep 7th, 2019
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.57 KB | None | 0 0
  1. program pro0001(output);
  2. const
  3.     N=10;
  4.     A=0.55;
  5.     B=1;
  6.     step=(B-A)/(N-1);
  7. var
  8.     i: integer;
  9.     x1: real;
  10. function x(n: integer): real;
  11.     begin
  12.         x:=A+(step*(n-1));
  13.     end;
  14. function f(x: real): real;
  15.     var y1, y2, y3: real;
  16.     begin
  17.         y1:=exp(ln(sin(x/2))*(3/2));
  18.         y2:=exp(ln(exp(1.3*x)+exp(-1.3*x))/3);
  19.         y3:=abs(x-7/9);
  20.         f:=(y1+y2)/y3;
  21.     end;
  22. begin
  23.     writeln('n, X, Y');
  24.     for i:=1 to N do
  25.         begin
  26.             x1:=x(i);
  27.             writeln(i,', ',x1:5:3,', ',f(x1):8:6);
  28.         end;
  29. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement