1.button
1 textbox(textbox'da "1" sayisi yazmaniz gerekiyor.)
2 listbox
Kod:
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim i As Integer For i = 1 To 49 ListBox1.Items.Add(i) Next i End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox2.Items.Clear() Randomize() Dim sayi(5) As Integer Dim rastgele, i, k, t, p As Integer For k = 1 To TextBox1.Text ListBox2.Items.Add("***kolon***") For i = 0 To 5 rastgele = Int(Rnd() * ListBox1.Items.Count) sayi(i) = ListBox1.Items(rastgele) ListBox1.Items.RemoveAt(rastgele) Next i Array.Sort(sayi) For p = 0 To 5 ListBox2.Items.Add(sayi(p)) Next p ListBox1.Items.Clear() For t = 1 To 49 ListBox1.Items.Add(t) Next t Next k End Sub End Class
__________________
V.B Sayisal Loto
Programlama0 Mesaj
●22 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Programlama
- V.B Sayisal Loto