Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If Check() = False Then MsgBox("輸入錯誤", 48, "Error") : Exit Sub
- Dim x As String = TextBox1.Text : Dim Count As Integer : TextBox2.Text = ""
- For i = 1 To 40
- Count = 0
- Do Until Mid(x, i, 1) = "1" Or i = 41
- Count += 1 : i += 1
- Loop
- TextBox2.Text &= Convert.ToString(Count, 2) & Space(1)
- Next
- TextBox3.Text = Format((Len(Mid(TextBox2.Text, 1, TextBox2.Text.Length - 1)) / 40), "00.##%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement