2009年2月27日 星期五

數字轉國字大寫2

image

Public Class Form1
    Dim i
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim f1 = "0123456789"
        Dim f2 = "壹貳参肆伍陸柒捌玖零"
        Dim g = "4 8 9 5 2"
        Dim a = g
        For i = 1 To 10
            a = Replace(a, Mid(f1, i, 1), Mid(f2, i, 1))
        Next i

        MsgBox(g & "國字大寫為:" & a)
    End Sub
End Class

沒有留言:

張貼留言