Advertisement
LT1stSoloMID

遊程編碼

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