Sunday, August 24, 2014

Membuat Bilangan Fibonacci

Halo halo
Kali ini saya menikmati hari minggu saya dengan nikmat..
ahh senangnya..
Setelah seminggu berkutat dengan kerjaan yang tak pernah habisnya Setan
Diminggu ini banyak kejadian di kantor yang membuat saya memahami betapa hectic nya kerjaan, sikap politis orang hebat dan tentunya saya masih tetap berada pada pendirian saya.. semoga saya diberikan kekuatan untuk selalu menyadari bahwa saya berasal dari kulit kacang… amin….
Cukup Senyum dengan mulut terbuka
Sekarang saya mencoba mengingat kembali pelajaran selama kuliah. Saya mencoba meng-koding lagi bilangan fibonacci.
Apa itu bilangan fibonacci?
Menurut wikipedia:
_______________________________________________________________________________
In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence:[1][2]
1,\;1,\;2,\;3,\;5,\;8,\;13,\;21,\;34,\;55,\;89,\;144,\; \ldots\;
or (often, in modern usage):
0,\;1,\;1,\;2,\;3,\;5,\;8,\;13,\;21,\;34,\;55,\;89,\;144,\; \ldots\; (sequence A000045 in OEIS).
By definition, the first two numbers in the Fibonacci sequence are 1 and 1, or 0 and 1, depending on the chosen starting point of the sequence, and each subsequent number is the sum of the previous two.
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation
F_n = F_{n-1} + F_{n-2},\!\,
with seed values[1][2]
F_1 = 1,\; F_2 = 1
or[3]
F_0 = 0,\; F_1 = 1.
The Fibonacci sequence is named after Fibonacci. His 1202 book Liber Abaci introduced the sequence to Western European mathematics,[4]although the sequence had been described earlier in Indian mathematics.[5][6][7] By modern convention, the sequence begins either with F0 = 0 or with F1 = 1. The Liber Abaci began the sequence with F1 = 1, without an initial 0.
Fibonacci numbers are closely related to Lucas numbers in that they are a complementary pair of Lucas sequences. They are intimately connected with the golden ratio; for example, the closest rational approximations to the ratio are 2/1, 3/2, 5/3, 8/5, ... . Applications include computer algorithms such as the Fibonacci search technique and the Fibonacci heap data structure, and graphs called Fibonacci cubes used for interconnecting parallel and distributed systems. They also appear in biological settings,[8] such as branching in trees,phyllotaxis (the arrangement of leaves on a stem), the fruit sprouts of a pineapple,[9] the flowering of an artichoke, an uncurling fern and the arrangement of a pine cone.[10]
___________________________________________________________________________________________________
Sudah cukup kan? Senyum dengan mulut terbuka
Sekarang lets see the code. The following code will give the real code not the bullshit explanation Senyum dengan lidah terjulur

Oke.. hasilnya seperti dibawah ini:
image
How? Semoga membantu kamu kamu sekalian Senyum dengan mulut terbuka
Next time i’ll write a code to show jtable data from database
CIaooo

No comments :

Post a Comment