Advertisement
D1maz

ะก6.3-0-29

Oct 14th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.54 KB | None | 0 0
  1. var i:integer;//ะก6.3-0-29
  2.     f1,f2,fn:integer;
  3.     fact,fact1:integer;
  4.     factn,factn1:integer;
  5.     sum:real;
  6.  
  7. begin
  8.   factn:=1;
  9.   factn1:=5;
  10.   fact:=1;
  11.   fact1:=5*4*3*2*1;
  12.   f1:=1;
  13.   f2:=1;
  14.   i:=1;
  15.   while i<>10 do
  16.     begin
  17.       sum:=sum+(f1/(fact*sqr(fact1)));
  18.       writeln(sum);
  19.       fn:=f1+f2;
  20.       f2:=f1;
  21.       f1:=fn;
  22.       fn:=f1+f2;
  23.       f2:=f1;
  24.       f1:=fn;
  25.       factn:=factn+2;
  26.       factn1:=factn1+2;
  27.       fact:=fact*(factn-1)*factn;
  28.       fact1:=fact1*(factn1-1)*factn1;
  29.       inc(i);
  30.     end;
  31. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement