Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim n, t, s As Integer
        n = CInt(TextBox1.Text)
        While n > 0
            t = n Mod 10
            s = s * 10 + t
            n = n \ 10   '注意是整除
        End While
        TextBox2.Text = CStr(s)
    End Sub
End Class
