level 1
purple独立日
楼主
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If IsNumeric(Text1.Text) And Val(Text1.Text) <> 0 Then
a(n) = Val(Text1.Text)
Picture1.Print a(n)
n = n + 1
Else: MsgBox ("输入不正确,请重新输入!")
End If
Text1.Text = ""
Text1.SetFocus
If n > 99 Then
Text1.Enabled = False
Else: Text1.SetFocus
End If
End If
Private Sub Command2_Click()
Dim sum As Single, i As Integer
sum = 0
i = 0
Do While a(i) <> 0
sum = sum + a(i)
i = i + 1
Loop
Picture1.Print "总和="; sum
请问这个n= n+1 ,i = i+1 是什么意思...这种类型的总是搞不懂,谢谢
2009年04月18日 01点04分
1
If KeyAscii = 13 Then
If IsNumeric(Text1.Text) And Val(Text1.Text) <> 0 Then
a(n) = Val(Text1.Text)
Picture1.Print a(n)
n = n + 1
Else: MsgBox ("输入不正确,请重新输入!")
End If
Text1.Text = ""
Text1.SetFocus
If n > 99 Then
Text1.Enabled = False
Else: Text1.SetFocus
End If
End If
Private Sub Command2_Click()
Dim sum As Single, i As Integer
sum = 0
i = 0
Do While a(i) <> 0
sum = sum + a(i)
i = i + 1
Loop
Picture1.Print "总和="; sum
请问这个n= n+1 ,i = i+1 是什么意思...这种类型的总是搞不懂,谢谢