题型:综合题 题类:常考题 难易度:困难
浙教版高一信息技术 专题五:VB程序设计
Private Sub Command1_Click()
Dim n As Integer, t As Integer
Dim r As Integer, c As Integer
Dim s As String
n=Val(Text1.Text)
s=””
Do While t>0
r=(t+1) Mod 2
t=t\2
c=c+1
Loop
For i=1 To 8-c
s=CStr(1)+s
Next i
Label1.Caption=” 十进制数”+CStr(n)+”的二进制反码为”+s
End Sub
试题篮