看板 Programming 關於我們 聯絡資訊
Dim grade() As Integer = New Integer(9) {} Dim i, total As Integer total = 0 For i = 0 To 8 grade(i) = InputBox("請輸入" & i + 1 & "學生成績", "共有九筆") 'Console.Write("請輸入{0:D2}位學生的成績:", i + 1) 'grade(i) = Console.ReadLine() total += grade(i) '計算成績總合 Next MsgBox("學生總平均為" & total / 9) 請教一下,我如何在inputbox這裡偵測 如果輸入的不是整數 他就不會儲存到陣列裡呢 謝謝 -- ┌─────KKCITY─────┐ 人人可架站,經營社群聯誼天地 bbs.kkcity.com.tw 歡迎社團/班系/歌友/藝文創作/公益申請 └──From:218.169.123.248 ──┘ KKCity 開設自己喜愛的主題BBS --