Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var f1,f2,fn:integer;//С6.3-0-29
- fact,fact1:integer;
- factn,factn1:integer;
- sum,sum1:real;
- eps:real;
- begin
- writeln('введите eps');
- readln(eps);
- factn:=1;
- factn1:=5;
- fact:=1;
- fact1:=5*4*3*2*1;
- f1:=1;
- f2:=1;
- sum1:=f1/(fact*sqr(fact1));
- fn:=f1+f2;
- f2:=f1;
- f1:=fn;
- fn:=f1+f2;
- f2:=f1;
- f1:=fn;
- factn:=factn+2;
- factn1:=factn1+2;
- fact:=fact*(factn-1)*factn;
- fact1:=fact1*(factn1-1)*factn1;
- while abs(sum1)>eps do//С6.3-0-29
- begin
- sum:=sum+sum1;
- writeln('sum = ',sum,'; sum1 = ',sum1);
- fn:=f1+f2;
- f2:=f1;
- f1:=fn;
- fn:=f1+f2;
- f2:=f1;
- f1:=fn;
- factn:=factn+2;
- factn1:=factn1+2;
- fact:=fact*(factn-1)*factn;
- fact1:=fact1*(factn1-1)*factn1;
- sum1:=f1/(fact*sqr(fact1));
- end;
- end.
Add Comment
Please, Sign In to add comment