Public Class Form1
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Dim per
As Single
per = TextBox1.Text
Select Case per
Case
0 To 49
Label4.Text = "Fail"
Case
50 To 59
Label4.Text = "D grade"
Case
60 To 69
Label4.Text = "C Grade"
Case
70 To 79
Label4.Text = "B Grade"
Case
80 To 89
Label4.Text = "B+ Grade"
Case
90 To 95
Label4.Text = "A Grade"
Case
95 To 100
Label4.Text = "A+ Grade"
Case Else
Label4.Text = "Please enter correct percentage"
End Select
End Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.