Advertisement
Drifting

Untitled

Oct 31st, 2013
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
WHOIS 0.94 KB | None | 0 0
  1. Public Class Form1
  2.  
  3.  
  4.     Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handlesbtncalculate.Click
  5.  
  6.         Dim bytepercentage As Byte
  7.  
  8.         lbloutput.Visible = True
  9.         lbloutput.Text = txtinput.Text / txtfullmark.Text * 100
  10.         bytepercentage = lbloutput.Text
  11.         Select Case bytepercentage
  12.         End Select
  13.  
  14.         If txtinput.Text > txtfullmark.Text Then
  15.             lbloutput.Text = "Error your input is invalid"
  16.             lbloutput.Visible = False
  17.  
  18.         ElseIf lbloutput.Text >= 80 Then
  19.             lblgrade.Text = ("A")
  20.         ElseIf lbloutput.Text >= 70 Then
  21.             lblgrade.Text = ("B")
  22.         ElseIf lbloutput.Text >= 60 Then
  23.             lblgrade.Text = ("C")
  24.         ElseIf lbloutput.Text >= 50 Then
  25.             lblgrade.Text = ("D")
  26.         ElseIf lbloutput.Text <= 50 Then
  27.             lblgrade.Text = ("E")
  28.         End If
  29.     End Sub
  30.  end class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement