GFA Basic LOVEPOPA's UNIVERSE
of FREE Atari source listings !!
GET_PI.BAS


' GET_PI.BAS
' (C) by PKF
'
Do
  Alert 0,"   Choose desired method    ",2,"Adding|Quit|Multiple",Pkf%
  Exit If Pkf%=2
  Deffill ,5,5
  Pbox 2,21,300,200
  Print At(3,3);"Press space bar to exit..."
  Print At(3,6);Pi
  If Pkf%=1
    B%=-1
    A%=-1
    P=0
    T%=Timer
    Do
      A%=A%+2
      B%=B%*(-1)
      P=P+4*(B%/A%)
      Print At(3,5);P
      Exit If Inkey$=" "
    Loop
  Else
    A%=2
    B%=3
    P=4
    T%=Timer
    Do
      P=P*(A%/B%)
      A%=A%+2
      P=P*(A%/B%)
      B%=B%+2
      Inc I%
      Print At(3,5);P
      Exit If Inkey$=" "
    Loop
  Endif
  Print At(2,7);Chr$(44-Sgn(Pi-P));Abs(Pi-P)
  Print At(3,9);"Elapsed time:"
  Print At(9,10);(Timer-T%)/200''"sec"
  Print At(9,11);(Timer-T%)/(200*60)''"min"
Loop
End


- MAIL TO ME -

Web design by PKF - 2001 -
Hosted by www.Geocities.ws

1