题型:综合题 题类:常考题 难易度:普通
浙江省高中信息技术 进制问题练习
程序部分代码如下:
Private Sub Command1_Click()
Dim n, m, s, i, j, count As Long
Dim flag As Boolean
Dim a(1 To 100) As Integer
n = Val(Text1.Text)
count = 0
①
For i = 0 to s-1
m = i
For j = 1 To n
a(j) = m Mod 2
m = m \ 2
Next j
flag = True
For j = 1 To n - 1
If ② Then flag = false: exit For
Next j
If flag = True Then ③
Next i
Label1.Caption =“可行方案共”+ Str(count) + “种”
End Sub
试题篮