Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Zadatak2.clsMath x = new Zadatak2.clsMath();

            long[] niz = new long[10];

            niz = x.GenFibonacci(10);

            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine(niz[i]);
            }

            Console.ReadLine();
        }
Exemplo n.º 2
0
        private void btnGenerisi_Click(object sender, EventArgs e)
        {
            try
            {
                int brClanova = Convert.ToInt32(txtBrClanova.Text);

                Zadatak2.clsMath x = new Zadatak2.clsMath();

                long[] niz = new long[brClanova];

                niz = x.GenFibonacci(brClanova);

                txtRichPrikazi.Text = String.Join(Environment.NewLine, niz);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Obavestenje", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }