Teman-teman bisa lihat Flowchart nya di bawah ini:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Fibonacci
{
class Program
{
static void Main(string[] args)
{
int i, bil1, bil2, hasil, jumlah;
i = 0;
bil1 = 1;
bil2 = 0;
hasil = 0;
Console.WriteLine("Inputkan Bilangan");
jumlah = Int16.Parse(Console.ReadLine());
do
{
hasil = bil1 + bil2;
Console.Write(hasil + ", ");
bil1 = bil2;
bil2 = hasil;
i++;
} while (i < jumlah);
}
}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BelajarLogika12
{
class Program
{
static void Main(string[] args)
{
int i;
int bil1 = 1;
int bil2 = 0;
int hasil = 0;
int jumlah;
Console.Write("Input Bilangan : ");
jumlah = Int32.Parse(Console.ReadLine());
for (i = 0; i < jumlah; i++)
{
hasil = bil1 + bil2;
Console.Write(hasil + ",");
bil1 = bil2;
bil2 = hasil;
}
Console.ReadKey();
}
}
}
Nahh gimana hasil outpunya? semoga sesuai yah,,, Akhirnya gua buat sendiri dengan menterjemahkan dari flowchart kepada bahasa pemograman,







