Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load ListBox1.MultiColumn = True Dim my_i, my_j As Integer For my_i = 2 To 9 For my_j = 1 To 9 ListBox1.Items.Add(my_i & " * " & my_j & " = " & (my_i * my_j).ToString()) Next Next End Sub End Class
* 10 미만의 답에 0을 붙여 정렬
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim n1, n2 As Integer
For n2 = 1 To 9
For n1 = 2 To 9
If (n1 * n2) < 10 Then
TextBox1.AppendText(n1 & "*" & n2 & "=0" & n1 * n2 & " ")
Else
TextBox1.AppendText(n1 & "*" & n2 & "=" & n1 * n2 & " ")
End If
If n1 = 9 Then
TextBox1.AppendText(vbCrLf)
End If
Next
Next
End Sub
End Class
이 댓글을
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
ListBox1.MultiColumn = True
Dim my_i, my_j As Integer
For my_i = 2 To 9
For my_j = 1 To 9
ListBox1.Items.Add(my_i & " * " & my_j & " = " & (my_i * my_j).ToString())
Next
Next
End Sub
End Class
이 댓글을
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer = 1
Dim j As Integer = 1
While (i <= 9)
While (j <= 9)
ListBox1.Items.Add(i & "x" & j & "=" & i * j)
j += 1
End While
j = 1
i += 1
End While
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
이 댓글을