2007-09-30 20:59:32※§←小惡→※

電腦課程式(評語和清除)

Private Sub Command1_Click()
MsgBox " 請跟著提示輸入"
chi = InputBox("請輸入國文成績")
eng = InputBox("請輸入英文成績")
mat = InputBox("請輸入數學成績")
Label1.Caption = "國文成績 " & chi & "分"
Label2.Caption = "英文成績 " & eng & "分"
Label3.Caption = "數學成績 " & mat & "分"
Avg = (Val(chi) + Val(eng) + Val(mat)) / 3
Label4.Caption = "總平均分數為" & Round(Avg, 2) & "分"
If Avg >= 90 Then
MsgBox "強唷"
Else
If Avg >= 60 And Avg < 90 Then
MsgBox "不錯啦"
Else
MsgBox "再加油"
End If
End If

End Sub

Private Sub Command2_Click()
Label1 = ""
Label2 = ""
Label3 = ""
Label4 = ""
End Sub