using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace sayısal_loto
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int z = 1;
private void button1_Click(object sender, EventArgs e)
{
z++;
Random sayı = new Random();
int[] dizi = new int[6];
for(int y=0;y<6;y++)
{
int tahmın = sayı.Next() % 49+1;
dizi[y] = tahmın;
for (int u = 0; u <=y-1; u++)
{
if (dizi[y] == dizi[u])
{
dizi[y] = sayı.Next() % 49 + 1;
}
}
}
for (int p = 0; p <6;p++)
{
for (int r = 0; r <6;r++)
{
if (dizi[p]
int m;
m = dizi[p];
dizi[p] = dizi[r];
dizi[r] = m;
}
}
}
foreach (int eleman in dizi)
{
listBox1.Items.Add(eleman);
}
listBox1.Items.Add("-------"+z+"."+"kolon"+"----------");
}
private void Form1_Load(object sender, EventArgs e)
{
listBox1.Items.Add("------1.kolon------");
}
}
}