program
using select case marks of five subject and display the total,percentage and class.
-----------------------------------------code---------------------------------------------------------
End ClassPublic Class
Form1
Private Sub
Button1_Click_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button1.Click
Dim s1,
s2, s3, s4, s5 As Integer
Dim per
As Integer
s1 = TextBox1.Text
s2 = TextBox2.Text
s3 = TextBox3.Text
s4 = TextBox4.Text
s5 = TextBox5.Text
TextBox6.Text = s1 + s2 + s3 + s4 + s5
TextBox7.Text = TextBox6.Text / 5
per = TextBox7.Text
If per
>= 0 And per < 35 Then
ElseIf
per >= 35 And per < 50 Then
TextBox8.Text = "Pass Class"
ElseIf
per >= 50 And per < 60 Then
TextBox8.Text = "Second Class"
ElseIf
per >= 60 And per < 70 Then
TextBox8.Text = "First Class"
ElseIf
per >= 70 And per <= 100 Then
TextBox8.Text = "Distinction"
End If
End Sub
End Class
-----------------------------------------output----------------------------------------------------
codestrew |
No comments:
Post a Comment