Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handlesbtncalculate.Click
- Dim bytepercentage As Byte
- lbloutput.Visible = True
- lbloutput.Text = txtinput.Text / txtfullmark.Text * 100
- bytepercentage = lbloutput.Text
- Select Case bytepercentage
- End Select
- If txtinput.Text > txtfullmark.Text Then
- lbloutput.Text = "Error your input is invalid"
- lbloutput.Visible = False
- ElseIf lbloutput.Text >= 80 Then
- lblgrade.Text = ("A")
- ElseIf lbloutput.Text >= 70 Then
- lblgrade.Text = ("B")
- ElseIf lbloutput.Text >= 60 Then
- lblgrade.Text = ("C")
- ElseIf lbloutput.Text >= 50 Then
- lblgrade.Text = ("D")
- ElseIf lbloutput.Text <= 50 Then
- lblgrade.Text = ("E")
- End If
- End Sub
- end class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement