第一题、
Private Sub Command1_Click()
Dim a As Integer, b As String, i As Integer, c() As String
a = Len(Text1.Text)
Print a
ReDim c(a) As String
For i = 1 To a
b = Mid(Text1.Text, i, 1)
Select Case b
Case "a" To "z"
c(i) = UCase(b)
Case "A" To "Z"
c(i) = LCase(b)
Case Else
c(i) = Chr(32)
End Select
Next i
Text1.Text = ""
For i = 1 To a
Text1.Text = Text1.Text & c(i)
Next i
End Sub
2、
Private Sub Form_click()
Dim a(5) As Double, i As Integer, j As Integer, k As Integer, sum As Double
Dim flag As Boolean, how As Boolean
For i = 1 To 5
a(i) = Val(InputBox("please input", "input number"))
sum = sum + a(i)
Next i
If sum > 450 Then
flag = True
how = True
End If
For k = 1 To 5
If a(k) > 88 Then
flag = True
how = True
End If
Next k
For j = 1 To 3
If a(j) > 95 Then flag = True
Next j
For k = 4 To 5
If a(k) > 80 Then how = True
Next k
If flag = True And how = True Then
Print "excellent"
End If
End Sub
3、Private Sub Form_click()
Dim s As Single, price As Single, total As Single
s = Text1.Text
If s < 100 Then
price = 32
ElseIf 100