🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / 50 ile 75 arasında Rastgele bir sayı oluşurup consola hem düzden hem tersten yazma

1-) C# - 50 ile 75 arasında Rastgele bir sayı oluşurup consola hem düzden hem tersten yazma

private void button1_Click(object sender, EventArgs e)

        {

            Random w = new Random();

            int[] a = new int[10];

 

            for (int i = 0; i < 10; i++)

            {

                int c = w.Next(50, 75);

                a[i] = c;

                Console.WriteLine(a[i]);

 

            }

            Console.WriteLine("********");

            for (int i = 9; i >= 0; i--)

            {

                Console.WriteLine(a[i]);

            }

 

        }

    }

}

 2021 Mart 11 Perşembe
 391