You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
題目說明:判斷成績是否大於等於 60?若是,便顯示”成績及格”的訊息<br />
檔案名稱:<strong>03</strong> \ ch5 \ P.135-1<br />
表單:<br />
程式碼:<br />
Private Sub Form_Activate()<br />
Dim score As Integer<br />
score = InputBox("請輸入成績", "成績輸入")<br />
If score >= 60 Then MsgBox "成績及格了", 48, "恭喜"<br />
If score < 60 Then MsgBox "成績不及格", 16, "再加油"<br />
End Sub<br />
執行結果:ex.輸入 60