daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.     a,b,h,y,s,z,x,a1,a2,sn:Real;
  3.     n,k,i:Integer;
  4.  
  5. begin
  6.   Writeln('x ot...do...s shagom...');
  7.   Readln(a,b,h);
  8.   x:=a;
  9.   while x<=b do
  10.    begin
  11.      y:=0;
  12.      s:=Sin(x)/2;
  13.      n:=2;
  14.      k:=4;
  15.      z:=x;
  16.      while abs(s)>=0.0001 do
  17.      begin
  18.      a1:=z;
  19.      i:=2;
  20.      sn:=x; a2:=1;
  21.      while Abs(a1)>=0.0001 do
  22.       begin
  23.         a2:=a1*(-z)*z/(i*(i+1));
  24.         sn:=sn+a2;
  25.         i:=i+2;
  26.         a1:=a2;
  27.         Writeln(a2:3:5);
  28.       end;
  29.        y:=y+s;
  30.        s:=n*sn/k;
  31.        inc(n);
  32.        k:=k*2;
  33.        z:=z*n;
  34.      end;
  35.      Writeln('x = ',x:5:8,' y = ',y:5:8);
  36.      x:=x+h;
  37.    end;
  38.    readln
  39. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top