i try to make fibonacci pattern but i confused.
there are anyone give me a hand for this example?please....

thanks in advance..

Recommended Answers

All 4 Replies

see this code :

function FIBO(N : integer) : integer; 

 begin 
   if (N = 1) or (N = 2) then 
      FIBO := 1 
   else 
      FIBO(N) := FIBO(N - 1) + FIBO(N - 2) 
 end;

hope this helps...

commented: thank you +1

thanks jx_man to fibo function. :)

you're welcome my friend :)

i try to make fibonacci pattern but i confused.
there are anyone give me a hand for this example?please....

thanks in advance..

I have some knowledge in this field. Fibonacci was a mathematician many centuries ago.
The Fibonacci pattern, or more correctly, Fibonacci spiral is based upon the Fibonacci sequence in which the subsequent following number is the sum of the previous two numbers.
The sequence begins with numbers 0 and 1 which results in the number 1 by addition of 0+1.
The following is the first few lines of the sequence.
0
0+1=1
1+1=2
1+2=3
2+3=5 and so on.

Thus the sequence is:- 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ....... etc.

The pattern is based upon a series of squares and this would difficult to produce here as it would require a drawing programme.

I hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.