学号 | 姓名 | 性别 | 出生年份 | 户籍所在地 | 注册日期 | 是否住校 |
201909001 | 张三 | 男 | 2003 | 柯桥街道 | 2019/8/1 | 是 |
201909002 | 李四 | 女 | 2004 | 柯岩街道 | 2019/8/1 | 否 |
… | … | … | … | … | … | … |
下列关于该学生管理信息系统的描述,错误的是( )
Dim s As String, c As String
Dim i As Integer, n As Integer, p As Integer
s = Text1.Text
n = Len(s)
p = 1
For i = 1 To n
c = Mid(s, i, 1)
If c >= "A" And c <= "Z" Then
t = c + t
Else
t = Mid(t, 1, p - 1) + c + Mid(t, p, Len(t) - p + 1)
p = p + 1
End If
Next i
Text2.Text = t
如果文本框Text1中输入“ABCD@1234”,则文本框Text2中输出( )
Dim s As Integer ‘’变量s存放和
Dim n As Integer
n = ① '为n赋初值
s = ② '为s赋初值
Do While s < 100
n = n + 1
s = s + n
Loop
Text1.Text = Str( ③ )
程序空格处,①、②、③应分别填写( )
图b
图c
图 b
Private Sub Cmd_Click()
Dim dec As Integer, n As Integer, i As Integer, w As Integer
Dim s As String, c As String, sd As String
s = Text1.Text
n =
sd=""
For i = 1 To n
c =
If c <> "|" Then
If c = "/" Then
w = 0
Else
w = 1
End If
dec =
Else
sd = sd + Str(dec) + ","
dec = 0
End If
Next i
Text2.Text = sd
End Sub
在程序设计课上,小明设计了一个程序用来计算离散型随机变量的数学期望,Text1中交替输入随机变量和相应概率,并以逗号“,”为分隔符,具体界面如下图所示。
Private Sub Cmd_Click()
Dim s As String, t As String, c As String,X As Single, p As Single, EX As Single
Dim n As Integer, k As Integer
s = Text1.Text
n = Len(s)
k = 0: EX = 0: t = ""
For i = 1 To n
c = Mid(s, i, 1)
If c = "," Then
k = k + 1
If Then
X = Val(t)
Else
p = Val(t)
EX =
End If
Else
t = t + c
End If
Next i
Text2.Text =
End Sub