Ask a questionAsk a question
 

General DiscussionNeed help in VB.NET

  • Sunday, June 21, 2009 5:01 PM.Net Beginner Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi All,

    I am new to VB.NET. I want to write a program for multiplication table for 2 numbers or variables. using "do while" and "for loop"

    can any one help me with this?

    Thanks
    -.NEt Learner :)

All Replies

  • Sunday, June 21, 2009 6:27 PM.Net Beginner Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi All,

    I am new to VB.NET. I want to write a program for multiplication table for 2 numbers or variables. using "do while" and "for loop"

    can any one help me with this?

    Thanks
    -.NEt Learner :)
    Hello can any one help me with this?
  • Sunday, June 21, 2009 6:47 PM.Net Beginner Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Dim x As Integer
    Dim counter As Integer = 1

    ' Try parsing the value they entered into an integer, placed in "x"
    Dim isConverted As Boolean
    isConverted = Integer.TryParse(Me.xInputNum.Text, x)

    If isConverted Then
    ' Clear the label beforehand
    Me.xNumTextBox.Text = ""

    ' Loop from 1 to 9 and multiple our input "x" and the counter value to get our result.
    Do While counter <= 9
    Me.xTableListBox.Text &= x & " * " & counter & " = " & (x * counter) & ControlChars.CrLf
    counter += 1 ' Increment the counter
    Loop

    End If
    End Sub

    how to write thin in VB.NETconsole Application