①考察学校附近的茶厂 ②访问学校附近的茶商
③收听广播 ④亲自品茶
①相同的数字连写,所表示的数等于这些数字相加得到的数,如Ⅲ=3;
②小的数字在大的数字的右边,所表示的数等于这些数字相加得到的数,如Ⅷ=8、XⅡ=12;
③小的数字(限于Ⅰ、X和C)在大的数字的左边,所表示的数等于大数减小数得到的数,如Ⅳ=4、Ⅸ=9;
王老师设计了一个将罗马数字转换成阿拉伯数字的程序,实现该功能的程序代码如下:
Private Sub Command1_Click()
Dim a(1 To 10)As String
Dim b(0 To 10)As Integer
Dim x As String,c As Integer,j As Integer
x=Text 1.Text
j=Len(x)
b(0)= 0
c=0
For i=1 To j
a(i)= Mid(x,j-i+1,1)
b(i)=zh(a(i))
If ① Then
c=c-b(i)
Else
c=c+b(i)
End If
Next i
Label2.Caption="结果:"+Str(c)
End Sub
Function zh(xAs String)As Integer
s="IVXLCDM"
zh=1
For i=1 To 7
If Then
Exit For
Elself ② Then
zh=zh*5
Else
zh=zh*2
End If
Next i
End Function
①②
Private Sub Command1_Click()
Dim i As Integer, j As Integer, n As Integer
Dim zm As Integer, flag As Boolean, zf As string
Randomize ‘重置rnd函数,确保每次产生的随机数不一致
zf = ""
n = Val(Text1.Text)
For i = 1 To n
zm = Int(Rnd * 26 + 65)
For j = 1 To Len(zf) Step 2
If Asc(Mid(zf, j, 1)) = zm Then
flag = True
Exit For
End If
Next j
If flag = False Then zf = zf + Chr(zm) + ","
Next i
Text2.Text = zf
End Sub
Private Sub Command2_Click()
Dim i As Integer, zf As string
zf=Text2.Text
k = 1
For i = 3 To Len(zf) - 1 Step 2
If Mid(zf, k, 1) > Mid(zf, i, 1) Then k = i
Next i
List1.AddItem Mid(zf, k, 1)
Text2.Text =
End Sub
②做好静电防护
③定期备份重要数据
④信息加密,对重要数据添加数字签名
⑤访问权限控制,添加访问密码
⑥检查防火、防水和防盗措施
①公民可以在互联网上自由发布任何信息 ②在虚拟世界中,违法犯罪行为同样要被绳之以法 ③互联网上信息丰富多彩,网民可以直接采信