Chung chi A
Private Sub Command1_Click()
Dim dtb As Single
Dim ng As Integer
Dim tp As Single
dtb = (Val(Text2) + Val(Text3) * 2 + Val(Text4) * 2) / 5
ng = Round(dtb, 0)
'Text6.Text = ng
tp = dtb - ng
If (tp > 0.2 And tp <= 0.5) Then 'de viet nhieu else trong if can phai suong hang sau then
Text5.Text = ng + 0.5
Else
If (tp > 0.5 And tp < 0.75) Then
Text5.Text = ng + 0.5
Else
If tp >= 0.75 Then
Text5.Text = ng + 1
Else
Text5.Text = ng
End If
End If
End If
If Val(Text5.Text) >= 9 And Val(Text2.Text) >= 5 And Val(Text3.Text) >= 5 And Val(Text4.Text) >= 5 Then
Text6.Text = "Xuaát Saéc"
Else
If Val(Text5.Text) >= 8 And Val(Text2.Text) >= 5 And Val(Text3.Text) >= 5 And Val(Text4.Text) >= 5 Then
Text6.Text = "Gioûi"
Else
If Val(Text5.Text) >= 7 And Val(Text2.Text) >= 4 And Val(Text3.Text) >= 4 And Val(Text4.Text) >= 4 Then
Text6.Text = "Khaù"
Else
If Val(Text5.Text) >= 5 And Val(Text2.Text) >= 3 And Val(Text3.Text) >= 3 And Val(Text4.Text) >= 3 Then
Text6.Text = "Trung Bình"
Else
Text6.Text = "Hoûng"
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()
End
End Sub
Bạn đang đọc truyện trên: Truyen247.Pro