Total conversion algorithm

xiaoxiao2021-03-06  75

In bored, you wrote the code of the amount of the amount of the conversion, very rough, but also: ") Private Sub Button1_Click (Byval E AS System.EventArgs) Handles Button1.click

DIM STR AS STRING STR = Me.TextBox1.Text.trim Dim isfs as boolean if left (str, 1) = "-" THEN ISFS = true str = str.remove (0, 1) else isfs = false end if Dim Strpoint AS STRING DIM POINT () AS STRING DIM J AS INT16 DIM JJ () AS String Dim Jjj AS String JJJ = "" IF str.indexof (".") <> -1 Then Point = Split (Str, ".", -1, comparemethod.text) str = point (0) strpoint = Point (1) Redim JJ (strpoint.Length - 1) for j = 0 to strpoint.Length - 1 JJ (j) = left (strpoint, 1) strpoint = Right (StrPoint, StrPoint.Length - 1) JJJ = JJJ Convert (JJ (J)) Next End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End End ENT = "" "" "" "" "" "" "" "" "" "" "2346" end while strcode = "1" & struct (strcode, str.Length) Dim i As Int16 Dim a () As String Dim strcode1 As String Dim countstr As Int16 Dim strcode2 As String countstr = strcode.Length ReDim a (strcode.Length - 1) For i = 0 To countstr - 1 a ( I) = Right (strcode, 1) strcode = left (strcode, strcode.length - 1) STRCODE1 = STRCODE1 & A (i) Strcode2 = STRCODE2 & "& MID (STR, I 1, 1) & MID STRCODE1, I 1, 1) Next Strcode2 =

Right (strcode2, strcode2.Length - 1) Dim newstr () As String newstr = Split (strcode2, ",", -1, CompareMethod.Text) Dim ii As Int16 Dim laststr As String Dim strcode3 As String Dim leftstr As String Dim rightstr As String For ii = 0 To newstr.Length - 1 strcode3 = newstr (ii) leftstr = Left (strcode3, 1) rightstr = Right (strcode3, 1) rightstr = Replace (rightstr, rightstr, convert2 (rightstr)) leftstr = Replace (Leftstr, Leftstr, Convert (Leftstr)) if leftstr = "zero" and (Rightstr = "Pick" or rightstr = "" or rightstr = "仟") THEN Rightstr = "" end if if ifetr = "zero" And (rightstr = "Wan" Or rightstr = "one hundred million") Then leftstr = "" End If strcode3 = leftstr & rightstr laststr = laststr & strcode3 Next While laststr.IndexOf ( "zero Bai Wan") <> -1 laststr = laststr .Replace ("万", "10,000") End while while laststr.indexof ("零 零") <> -1 laststr = laststr.replace ("zero thousand", "10,000") End while while laststr.indexof ("万 万") <> -1 Laststr = laststr.replace ("万", "zero") End while while laststr.indexof ("零") <> -1 laststr = laststr.replace ("零", "100 million") End while While Laststr .INDEXOF ("Zero Zero") <> -1 laststr = laststr.replace ("zero zero", "zero"

) End while while (Laststr, 1) = "zero" Laststr = Left (Laststr, Laststr.length - 1) end while if isfs = true damtr = "Negative" & Laststr End if IF JJJ = "" "" "" "" "" "" Innerhtml = laststr else if laststr = "" "" inin "& jjj else td2.innerhtml = laststr &" point "& jjj Endstr &" Point "& JJJ END IF End IFEND SUB

转载请注明原文地址:https://www.9cbs.com/read-93843.html

New Post(0)