Re: Fibonacci program



"spartacus" <schick.jonathan@xxxxxxxxx> wrote:
>
> i have to program a cobol program where the prompt lists the fibonacci
> number sequence with a maximum of 9 digits. i'm supposed to use COMPUTE
> and ON SIZE ERROR.
>
> can anyone please help?

Fibonacci Series: each number F(n) = F(n-1) + F(n-2), beginning with F(1) =
1 (e.g. 1,1,2,3,5,8, ...).

The Fibonacci Series is one of those Gee Whiz numbers that turn up in many
surprising and unexpected places, like e, ? and ? (Golden Ratio = sqrt[5 +
1] / 2). The number of seeds in the spirals of sunflower heads are often
consecutive Fibonacci numbers.

Circa 1969 I created a little one-card binary program for the IBM 1401 that
would print all the Fibonacci numbers through 132 digits, until it
overflowed the print buffer. When I submitted it as a batch job (one card
in - many pages out), the operators were not as amused as I was. :-)
--
Judson McClendon judmc@xxxxxxxxxxxxx (remove zero)
Sun Valley Systems http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


.



Relevant Pages

  • Fibonacci[1,000,000,000] contains 208,987,640 decimal digits
    ... > For finding the number of digits in any sufficently large Fibonacci ... Sloane's sequence A068070 ... here is a fast way to find the n_th Tribonacci number: ...
    (sci.math.symbolic)
  • Working with BIG big numbers
    ... I've tried stuff like "long double myBigNumber;" but that doesn't ... Been checking google too, and still haven't found any info. ... was working on a Fibonacci number calculator and got it to calculate up to ... digits are a little off, and over 70% of it is 0's. ...
    (comp.lang.java.help)
  • Re: Fibonacci program
    ... >> number sequence with a maximum of 9 digits. ... > The Fibonacci Series is one of those Gee Whiz numbers that turn up in many ... > overflowed the print buffer. ...
    (comp.lang.cobol)
  • Re: Fibonacci program
    ... > i have to program a cobol program where the prompt lists the fibonacci ... > number sequence with a maximum of 9 digits. ... that prints out all the fibonacci numbers that fits within 9 digits. ...
    (comp.lang.cobol)
  • Re: Fibonacci[1,000,000,000] contains 208,987,640 decimal digits
    ... >> For finding the number of digits in any sufficently large Fibonacci ... > N. Sloane get now a comment to A068070 with the corrected sequence ... for n = 0 as the contribution from 1/phi^n in the usual formula is ...
    (sci.math.symbolic)