序号 | 图书编号 | 书名 | 作者 | 入库日期 | 借阅状态 |
27 | BK001 113 | 安娜·卡列尼娜 | 列夫·托尔斯泰 | 2014-07-31 | 是 |
28 | BK003839 | 城南旧事 | 林海英 | 2016-08-01 | 否 |
29 | BK002028 | 时间简史 | 霍金 | 2020-08-02 | 是 |
… | … | … | … | … | … |
下列关于该图书管理信息系统的描述,正确的是( )
s= "abcde"
m=0
L=Len(s) :n=L
Do While n>0
m=(m+3) Mod n+1
s=Mid(s,1,m-1)+ Mid(s,m+1,L) +Mid(s,m,1)
n= n-1
Loop
执行该程序段后,变量s的值是( )
s=0:t=0
For i=1 To 5
If a(i)-a(i+1)<t Then
t=a(i)-a(i+l)
s=s+1
End If
Next i
数组元素a(1)到a(6)的值依次为“4,5,3,2,7,5”,执行该程序段后,变量s的值为( )
s= "47923123"
f=True : n=Len(s) : m=0
For i=2 To n
If Mid(s, i, 1)> >Mid(s, i - 1, 1) Then
Else
End If
Next i
Print "升序段个数有"十Str(m)
上述程序段中方框处可选语句为:
①f= True
②f= False
③If f Then m=m+1
则(1)(2)(3)处语句依次为( )
Key= Val(Text1.Text)
i=1: j=10: n=0
Do While i<=j
m=(i+j)\2
n=n+1
If a(m) : > Key Then
j=m-1
Else
i=m+ 1
End If
Loop
Text2.Text=str(n)
数组元素a(1)到a(10)的值依次为“2,3,5,8,9,10,13,17,19,25”。在文本框Text1中输入待查找的整数,执行该程序段,则文本框Text2中显示3,待查找数不可能是( )
(提示:SUMIF(条件区域,求和条件,实际求和区域),第二个求和条件参数作用在第一个条件区域里。SUMIF(A2:A13,“>50",B2:B13)表示A2:A13区域大于50的对应实际求和区域B2:B13数据求和)
Private Sub Command1_ Click( )
Dim a(0 To 4) As Integer, b(1 To 4) As Integer
Dim key As String, s As String, n As Integer, k As Integer, i As Integer, j As Integer, sum As Integer
key="ABCDEFGHJKIMNC)PQRSTUVWXYZabdefghijklmnopqrstuvwxyz0123456789! @# $ %&.*"
Randomize
n= Val(Text1.Text)
a(0)=0:a(1)=26 :a(2)=52 :a(3)=62:a(4)=70 '记录每种符号的结束位置
s= ""
For i=1 To 4
b(i) =0 'b数组记录某类符号是否使用
Next i
sum=4 '当前未使用字符类型,初始为4种
Do While Len(s)+sum< n
k= '随机选择一个密码序号
s=s+ Mid(key, k, 1)
i= 1
Do While
i=i+ 1
Loop
b(i)= 1
sum=4-b(1)-b(2)-b(3)-b(4)
Loop
'生成剩余未出现元素密码,保证4种符号均有出现
For i=1 To sum
j=Int(Rnd*4)十1
Do While ( )
j=j Mod 4+1
Loop
b(j)=1
k=Int(Rnd * (a(j)-a(j- 1)))+a(j-1)+1
s=s+Mid(key, k, 1)
Next i
Text2.Text=s
End Sub
Const n=200 '报名人数
Const nz=10 '专业数
Dim zybh(1 To n) As Integer, zyname(1 To n) As String, sname(1 To n) As String, zymark(1 To n) As Integer
Dim b(1 To nz) As Integer '存储每个专业的人数
Dim c(1 To nz) As Integer
Dim d(1 To n) As Integer
Dim q(1 To n) As Integer
Private Sub Form_ Load()
'本过程读取专业编号、专业名称、姓名和面试分的数据分别存储在数组zybh,zyname,sname, zymark中,并在List1中显示,代码略
End Sub
Private Sub Command1_ Click( )
Dim i As Integer, j As Integer, k As Integer, t As Integer, pos As Integer
For i=1 To nz
b(i)=0
Next i
For i=1 To n
d(i)=0 : q(i)=0
Next i
For i=1 To n
k= zybh(i)
b(k)=b(k) + 1
Next i
k=1
For i=1 To nz
c(i)=k
Next i
For i=1 To n-1
For j=i+1 To n
If zybh(i)= zybh(j) And zymark(i) < <> zymark(j) Then
If Then
d(j)=d(j)+1
Else
d(i)=d(i)+1
End If
End If
Next j
Next i
For i=1 To n
j=0
Do While
j=j+1
Loop
q(c(zybh(i))+d(i)+j)=i
Next i
For i=1 To n
List2.AddItem "" & zybh(q(i)) & " " & zyname(q()) & " " & sname(q(i))& "" & zymark(q(i) & "" & d(q(i)) + 1
Next i
End Sub