🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / 50 ile 100 arasında 20 tane sayı üretip bu sayıları int dizisine atıp ekrana yazdır

1-) C# - 50 ile 100 arasında 20 tane sayı üretip bu sayıları int dizisine atıp ekrana yazdır

ve ****** yazdır sonra tersten yazdır ve **** sonra ilk 10 tanesini ters yazdır diğerlerini düz yazdır.(20)

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

 

namespace ODEV5

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            Random w = new Random();

            int[] a = new int[20];

 

 

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

            {

                a[i] = w.Next(50, 100);

                Console.WriteLine(a[i]);

            }

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

 

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

            {

                Console.WriteLine(a[i]);

            }

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

 

 

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

            {

                Console.WriteLine(a[i]);

            }

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

            {

                Console.WriteLine(a[i]);

            }

        }

    }

}

 

 2021 Mart 11 Perşembe
 440