Public Class Form1
Dim c1, c2, m1, m2, com1, com2, evs1, evs2, it1, it2, total1, total2, per As Single
Private Sub cmdresult_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdresult.Click
c1 = C_MM.Text
c2 = C_MM.Text
m1 = M_OM.Text
m2 = M_MM.Text
com1 = Comm_OM.Text
com2 = Comm_MM.Text
evs1 = EVS_OM.Text
evs2 = EVS_MM.Text
it1 = IT_OM.Text
it2 = IT_MM.Text
total1 = c1 + m1 + com1 + evs1 + it1
total2 = c2 + m2 + com2 + evs2 + it2
per = (total1 / total2) * 100
OM.Text = total1
MM.Text = total2
txtper.Text = per
Select Case per
Case Is > 60
lbldiv.Text = "1st Division"
Case Is > 50
lbldiv.Text = "2nd Division"
Case Is > 35
lbldiv.Text = "3rd Division"
Case Else
lbldiv.Text = "FAIL"
End Select
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.