Menentukan Barisan Fibonacci Dengan Array C# Posted by Unknown on January 14, 2015 Get link Facebook X Pinterest Email Other Apps Dengan keterangan program : - Input berupa : Jumlah Suku. - Simpan nilai setiap suku ke dalam Array. - Rumus Fibonacci yang digunakan : Suku-1 = suku-2 = 1 Fibo (N) = Fibo (N – 2) + Fibo (N – 1) using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MODUL5_1 { class Program { static void Main(string[] args) { int[] fibo = new int[0]; int bilangan; Console.Write("Jumlah suku Fibonacci = "); bilangan = Convert.ToInt32(Console.ReadLine()); for (int i = 0; i Comments
Comments
Post a Comment