Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i, j As Integer Dim gec As String gec = "" ListBox1.Items.Clear() For i = 1 To Val(TextBox1.Text) For j = 1 To i gec = gec & " " & j Next j ListBox1.Items.Add(gec) gec = "" Next i gec = "" ListBox2.Items.Clear() For i = Val(TextBox1.Text) To 1 Step -1 For j = i To 1 Step -1 gec = gec & " " & j Next j ListBox2.Items.Add(gec) gec = "" Next i End Sub End Class
Home »
Vb.Net
» Vb.Net textbox’a girilen sayıya kadar olan sayıları listbox’a dik üçgen olarak ekleme