fork download
  1. program ideone;
  2. const
  3. n=100;
  4. e=0.01;
  5. var
  6. b:array[1..n] of Real;
  7. ch:Real;
  8. i,m:Byte;
  9. x:Real;
  10. begin
  11. Write('m=');
  12. Readln(m);
  13. x:=1;
  14. for i:=1 to m do
  15. begin
  16. Readln(b[i]);
  17. x:=x*b[i];
  18. end;
  19. i:=1;
  20. ch:=1;
  21. while Abs(ch)>=e do
  22. begin
  23. ch:=ch*x/i;
  24. Writeln(i,')',ch:6:3);
  25. inc(i);
  26. end;
  27. end.
Success #stdin #stdout 0s 232KB
stdin
4
0.15
-1.7
2
-0.7
stdout
m=1) 0.357
2) 0.064
3) 0.008