🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / 59. Random Komutu

1-) C# - 59. Random Komutu
using System;

using System.Windows.Forms;

 

namespace _59.Random_Komutu

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            Random rd = new Random();

            int s1, s2, s3;

            s1 = rd.Next(1, 5);

            s2 = rd.Next(1, 5);

            s3 = rd.Next(1, 5);

            label1.Text = s1.ToString();

            label2.Text = s2.ToString();

            label3.Text = s3.ToString();

        }

    }

}

 2021 Mart 11 Perşembe
 429