写下代码,我对照一下,谢谢

解决方案 »

  1.   

        s = "00000011"
        d = CInt(Left(s, 1))
        For i = 2 To Len(s)
            d = d * 2 + CInt(Mid(s, i, 1))
        Next i
        Debug.Print d
      

  2.   

    Module Module1    Sub Main()
            Console.WriteLine("Please input a binary number:")
            Dim strInput As String = Console.ReadLine()
            Dim n = Convert.ToInt32(strInput, 2)
            Console.WriteLine(n)
        End SubEnd Module
      

  3.   

    vb.net跟vb6.0是两种语言、、、、