vb程序设计题目

2024-12-26 06:25:37
推荐回答(2个)
回答1:

错误三次将终止程序这个不必要吧
1
Private Sub Text1_KeyPress(KeyAscii As Integer)
Static n As Single

If KeyAscii = 8 Then Exit Sub '退格键,不处理
If KeyAscii > 57 Or KeyAscii < 48 Then
KeyAscii = 0
n = n + 1
End If
If n > 3 Then '没什么必要哦
MsgBox "数错3次了,将退出系统"
End
End If
End Sub

2
dim suzu(10) as single
for i=0 to 9
for j=i+1 to 10
if suzu(i)>suzu(j) then
tem=suzu(i)
suzu(i)=suzu(j)
suzu(j)=tem
endif
next
next

回答2:

要是等不到捏?