Re: Fibonacci program
- From: "Judson McClendon" <judmc@xxxxxxxxxxxxx>
- Date: Sun, 23 Oct 2005 12:43:50 -0500
"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."
.
- Follow-Ups:
- Re: Fibonacci program
- From: Peter Lacey
- Re: Fibonacci program
- From: Judson McClendon
- Re: Fibonacci program
- References:
- Fibonacci program
- From: spartacus
- Fibonacci program
- Prev by Date: Re: Cobol work?
- Next by Date: Re: Cobol work?
- Previous by thread: Re: Fibonacci program
- Next by thread: Re: Fibonacci program
- Index(es):
Relevant Pages
|
|