恋_紫花地丁吧 关注:20贴子:374
  • 10回复贴,共1

哇咔咔,放个小程序。。。

只看楼主收藏回复

一楼度。。


IP属地:江苏1楼2010-12-23 11:25回复
    Public Function BIN(Dec As Long) As String
         BIN = ""
         Do While Dec > 0
             BIN = Dec Mod 2 & BIN
             Dec = Dec \ 2
         Loop
             If Len(BIN) < 5 Then BIN = "0" + BIN
             If Len(BIN) < 5 Then BIN = "0" + BIN
             If Len(BIN) < 5 Then BIN = "0" + BIN
             If Len(BIN) < 5 Then BIN = "0" + BIN
    End Function
    Public Function BIN3(Dec As Long) As String
         BIN3 = ""
         Do While Dec > 0
             BIN3 = Dec Mod 5 & BIN3
             Dec = Dec \ 5
         Loop
             If Len(BIN3) < 3 Then BIN3 = "0" + BIN3
             If Len(BIN3) < 3 Then BIN3 = "0" + BIN3
             If Len(BIN3) < 3 Then BIN3 = "0" + BIN3
    End Function
    Private Sub Command1_Click()
    a = Replace(Text1.Text, " ", "")
    a = UCase(a)
    b = -Int(-Len(a) * 3 / 8)
    u = ""
    For i = 1 To b
    u = u + BIN(Val(Asc(Mid(a, i, 1))) - 64)
    Next i
    For i = b + 1 To Len(a)
    d2 = d2 + BIN3(Val(Asc(Mid(a, i, 1))) - 64)
    Next i
    For i = 1 To Len(u)
    If Len(d2) < Len(u) Then
    d2 = d2 + "0"
    End If
    Next i
    For i = 1 To Len(u)
    c = c + Str(Val(Mid(u, i, 1)) * 5 + Val(Mid(d2, i, 1)))
    Next i
    c = Replace(c, " ", "")
    Text2.Text = c
    End Sub
    


    IP属地:江苏2楼2010-12-23 11:25
    收起回复
      原来是算盘密码


      来自掌上百度4楼2011-04-22 17:34
      回复
        人肉一下…初三16,濮元杰→_→


        来自掌上百度5楼2011-04-22 17:34
        回复
          回复:5楼
          人肉我干啥~~


          IP属地:江苏6楼2011-04-22 17:35
          回复
            看到一个杰字倍感亲切啊~~而且也是很稀有的姓氏吧~~


            7楼2011-04-22 21:33
            回复
              回复:7楼
              如此普遍的姓氏


              IP属地:江苏8楼2011-04-23 16:50
              回复
                哟…


                来自掌上百度9楼2011-04-23 17:39
                回复