🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #172

Re: Problem with VB for next loop

#172
From: Ishida
Date: Fri, 21 Nov 1997 12:58
31 lines
1528 bytes
My name is Ishida.
I  don't understand English.

> pi/4 = 2/3 * 4/3 * 4/5 * 6/5 * 6/7 * 8/7 *...
> 
> I just couldn't figure out how to do this with the For-Next loop in VB
> and would really appreciate it if anyone can offer me some hint/help.
> Thank you!

I don't understand meaning of "pi/4 = " .

/////////////////////////////////////
logic of
i = 2/3 * 4/3 * 4/5 * 6/5 * 6/7 * 8/7 *...
/////////////////////////////////////
Dim i As Integer
Dim Result  as Double

Result = 0
Result = 2/3

For i = 3 To LoopCount
    if mod(i/2) = 0 then
        Result = Result * ( i / (i+1) ) 
    Else
        Result = Result * ( (i+1) / i )
    End If
Next i

----------------------------
 I will be of help to you.
Technical Details
Message-ID: <6540ht$bqr$1@nn-tk001.ocn.ad.jp>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.gip.net!news-stock.gip.net!news.gsl.net!gip.net!newssvt05.tk!newssvt04.tk!nntp-egw.ocn.ad.jp!nn-tk001.ocn.ad.jp!not-for-mail
References: <3474B8D9.B305D462@okcom.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.gip.net!news-stock.gip.net!news.gsl.net!gip.net!newssvt05.tk!newssvt04.tk!nntp-egw.ocn.ad.jp!nn-tk001.ocn.ad.jp!not-for-mail
From: "Ishida" <Ishida@ns.cam.co.jp>
Newsgroups: pl.comp.lang.vbasic,fj.lang.visualbasic,comp.lang.basic.visual.misc
Subject: Re: Problem with VB for next loop
Date: 21 Nov 1997 12:58:37 GMT
Organization: CAM
Lines: 32
Message-ID: <6540ht$bqr$1@nn-tk001.ocn.ad.jp>
References: <3474B8D9.B305D462@okcom.net>
NNTP-Posting-Host: 210.145.103.4
Mime-Version: 1.0
X-Newsreader: Microsoft Internet News 4.70.1161
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit