24h購物| | PChome| 登入
2007-09-30 20:59:32| 人氣38| 回應0 | 上一篇 | 下一篇

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

推薦 0 收藏 0 轉貼0 訂閱站台

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

台長: ※§←小惡→※
人氣(38) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文