![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-53/ti_inject-812ce.png)
利用格公式求 π。 π/4=1-1/3+1/5-1/7+⋯ ,直到最后一项的值小于10 -6 为止。 (注意大小写区别) program e2_32; var n,fh:longint; s,t,p:real; begin writeln; n:=1; s:=___1___; t:=1; fh:=1; while (abs(t)>=1e-6) do begin t:=fh/n; s:=s+t; n:=___2___; fh:=-fh; end; p:=___3___; writeln('pi=',___4___); end.