Programming for Everybody: Source Code: how to create Multiplication Table with for... next Loop in Visual Basic.Net

Source Code: how to create Multiplication Table with for... next Loop in Visual Basic.Net

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

        Dim n, result, tm As Integer


        Dim str As String



        tm = TextBox2.Text


        Me.TextBox1.Text = ""



        For n = 1 To 12

            str = tm & "x" & n & "="



            result = tm * n


            Me.TextBox1.Text = TextBox1.Text & str & result & vbCrLf



        Next



    End Sub

No comments:

Post a Comment