CÓDIGOS PARA REALIZAR LA TABLA DE MULTIPLICAR

CÓDIGOS PARA REALIZAR LA TABLA DE MULTIPLICAR


Public Class Form11

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        Dim a, b, c, d As Integer
        d = 0
        If TextBox1.Text = "" Then

        Else
            a = TextBox1.Text
            d = TextBox2.Text

            For b = 1 To d
                c = a * b
                TextBox3.Visible = True
                TextBox3.Text = TextBox3.Text & a & " x " & b & " = " & c & vbCrLf
            Next
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = " "
        TextBox2.Text = " "
        TextBox3.Text = " "
    End Sub

    End Class


2 comentarios: