Module Tester
Sub Main()
Dim grade As Integer = 89
Dim aCount As Integer = 0
Dim bCount As Integer = 0
Dim cCount As Integer = 0
Dim dCount As Integer = 0
Dim fCount As Integer = 0
Select Case grade
Case 100
Console.WriteLine("Perfect Score!" & vbCrLf & "Letter grade: A" & vbCrLf)
aCount += 1
Case 90 To 99
Console.WriteLine("Letter Grade: A" & vbCrLf)
aCount += 1
Case 80 To 89
Console.WriteLine("Letter Grade: B" & vbCrLf)
bCount += 1
Case 70 To 79
Console.WriteLine("Letter Grade: C" & vbCrLf)
cCount += 1
Case 60 To 69
Console.WriteLine("Letter Grade: D" & vbCrLf)
dCount += 1
Case 0, 10 To 59
Console.WriteLine("Letter Grade: F" & vbCrLf)
fCount += 1
Case Else
Console.WriteLine("Invalid Input. " & _
"Please enter a valid grade." & vbCrLf)
End Select
End Sub
End Module
|