vb十进制二进度互转.docxVIP

  • 3
  • 0
  • 约小于1千字
  • 约 2页
  • 2021-01-13 发布于辽宁
  • 举报
VB十进制二进制互转 审计署计算机中级培训第二周,城厢区审计局 陈剑芳 Private Sub Comma nd1_Click() Dim a As Single, b As Integer, c As Single, d As Integer, e As Integer, x As String, y As Stri ng a = CSn g(Text1.Text) if a mod 1=0 b = Fix(a) Do While b 0 If b Mod 2 = 0 The n Pri nt 0 x = 0 x b = b \ 2 Else Print 1 x = 1 x b = b \ 2 End If Loop Else c = a - Fix(a) Pri nt c For e = 1 To 6 Step 1 If c * 2 \ 1 = 1 The n Print 1 y = y 1 c = c * 2 - 1 Else Print 0 y = y 0 c = c * 2 End If Next Text2.Text = Trim(x . y) End Sub Private Sub Command2_Click() Dim o As Long, p As Long, q As Long, r As Long, s As Long, t As Long,

文档评论(0)

1亿VIP精品文档

相关文档