From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,55603c56db8d8307 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-18 20:08:21 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!agate!barrnet.net!nntp.crl.com!crl.crl.com!not-for-mail From: weiqigao@crl.com (Weiqi Gao) Newsgroups: comp.lang.ada Subject: Re: Fibonacci Numbers? Date: 17 Sep 1994 22:17:59 -0700 Organization: CRL Dialup Internet Access (415) 705-6060 [login: guest] Message-ID: <35gii7$3ef@crl.crl.com> References: <35fl28$1h3@garuda.csulb.edu> NNTP-Posting-Host: crl.com Date: 1994-09-17T22:17:59-07:00 List-Id: In article <35fl28$1h3@garuda.csulb.edu>, S. Hegede wrote: > >Hey! I'm an a beginning Ada programmer and I've been stuck for a while >on trying to write a program in which a user can get the number in a >Fibonacci series( Ex. 1,1,2,3,5,8,13,21...) by typing its position in >the series. I only need help on getting the formula down that would >calculate the next number in the series. Thanks for the help. >. > > fib(n) = 1/sqrt(5) * [ ( 1 + sqrt(5))^n - ( 1 - sqrt(5))^n ] / 2^n. \/\/eiqi Gao weiqigao@crl.com