自上而下两个文本框的名称分别是Text1和Text2,“开始”按钮的名称是Command1。在Text1
中输入数据,单击“开始”按钮,在Text2中显示统计结果。“开始”按钮单击事件处理过程的流程图如右图所示。请根据流程图将下列程序补充完整
Private Sub Command1_Click( )
Dim n As Integer, m As Integer, i As Integer
Dim x As Single, y As Single
n =
m=0
Randomize ′初始化Rnd函数
For i = 1 To n
x = Rnd ′随机产生x坐标,0≤x<1
y = Rnd ′随机产生y坐标,0≤y<1
Next i
Text2.Text = Str(m)
End Sub