0

hi i really need help, i m trying to write a program that displays in a textbox a talbe of the binary, octal, and hexadecimal equivalents of the decimal numbers in range 1-222.
Plz help i m new to vb....Thks you

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by jatt09
0
Dim sTemp As String = ""
        TextBox1.Multiline = True
        TextBox1.Dock = DockStyle.Fill
        TextBox1.ScrollBars = ScrollBars.Vertical
        TextBox1.Font = New System.Drawing.Font("Courier New", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

        For i As Integer = 1 To 222
            sTemp = sTemp & String.Format("{0,6} {0, 10:X} {1, 10:C} {2, 10:C}", i, Convert.ToString(i, 8), Convert.ToString(i, 2)) & vbCrLf

        Next
        TextBox1.Text = sTemp
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.