Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program product;
- const
- m = 400;
- var
- p,x:extended;
- n:word;
- begin
- product :=1.0;
- for n:=2 to m do
- begin
- x:=sqr(1.0/n);
- if odd(n) then
- product:=product*(1.0 - x)
- else
- product := product * (1.0 + x);
- end
- writeln('proizvedenie dlya 2 <= n <= ', m,':');
- writeln;
- writeln('p(1+(-1)^n/n^2) = ', product);
- writeln;
- writeln('nagmite Enter: ');
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement