1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Option Explicit On
Option Strict On
Option Infer Off
Public Class frmMain
Private strNumber As String
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles btnDisplay.Click
Dim intCount As Integer = 0
Dim intScore As Integer
Dim intScores() As Integer = {88, 72, 99, 20, 66, 95, 99, 100, 72, 88, 78, 45, 57, 89, 85, 78, 75, 88, 72, 88}
strNumber = InputBox("Enter a score from 0 through 100.", "Scores")
For Each intScore In intScores
intCount += 1
Next
MsgBox(intCount)
End Sub
End Class
|