Date : Tue, 05 Apr 2005 15:38:44 +0100 (BST)
From : Brian Widdas <brian@...>
Subject: Re: Quick to BBC
On Tue, 5 Apr 2005, Tom Drage wrote:
> This is a program someone wrote for QuickBasic.
>
>
> DEFDBL A-Z
> Pi = 2 'Starting factor
> FOR i = 2 TO 5000000 STEP 2
> Pi = Pi * i * i / ((i - 1) * (i + 1))
> NEXT
> PRINT "Pi is approximately:"; Pi
> END
>
Pi=2: REM Starting factor
FOR i = 2 TO 5000000 STEP 2
Pi = Pi * i * i / ((i - 1) * (i + 1))
NEXT
PRINT "Pi is approximately:"; Pi
END
Brian
--
* * * * ** * * ** ** * *
* ** * * ** * * * *
* * * * * *