P497 ORACLE 497 Mon26 Apr ITV 1901:00 30402024GFSN0m ETEPI 30402024GFSN0m 1 GRAPHICS |>2 FLOAT : NO EXTEND : SINGL E : OPTION BASE 0|}3 ! ***************** ****************** PI P2OGRAM ------ -E.T.EMMS MAY 1981 ***************** ******************|94 GRAPHICS : ; CHR$( 12) : FG -1 : FG 1|(5 DIM A(250) : RANDO MIZE |76 OUT 156,147 : OUT 157,6 : OUT 1 58,5 : OUT 159,4|!7 A1=120 : B1=120|r8 F GPOINT A1-100,B1-100,1 : FGLINE A1+100,B 1-100 : FGLINE A1+100,B1+100 : FGLINE A1 -100,B1+100 : FGLINE A1-100,B1-100|}9 FG POINT A1+100,B1 : FOR X=0 TO 2*PI STEP P I/180|t10 FGLINE A1+100*COS(X),B1+100*SI N(X) : NEXT X |!11 FOR R=1 TO 100 : A=IN T(-100+200*RND) : B=INT(-100+200*RND)|41 2 IF A*A+B*B>10000 THEN S=S+1 : FGPOIN T A1+A,B1+B,2 ELSE T=T+1|s13 NEXT R : FG 1|)14 FGPOINT A1-79,B1,1 : FGLINE A1+73 ,B1|:15 FGPOINT A1-79,B1-30 : FGLINE A1- 79,B1+30|"16 V=4*T/(S+T)|:|
P497 ORACLE 497 Mon26 Apr ITV 1900:11 30402024GFSN0m ETEPI 30402024GFSN0m 17 ; CUR(0,10) SPACE$(30) CUR(0,10) CYA "VALUE OF PI=";V|m18 U=U+1 : ; CUR(23,10 ) YEL "COUNT=";U;" HUNDRED";|r19 A(U)=10 00*(V-PI)|"20 IF ABS(A(U))>100 THEN A(U) =100*SGN(A(U))|x21 FOR Z=1 TO U : FGPOIN T A1-75+Z,B1,3 : FGLINE A1-75+Z,B1+A(Z) : NEXT Z |-22 FGPOINT A1-100,B1-100,1 : FGLINE A1+100,B1-100 : FGLINE A1+100,B1+ 100 : FGLINE A1-100,B1+100 : FGLINE A1-1 00,B1-100|)23 IF U<80 GOTO 11|$24 GET Z$ : FG 0|w|