Public Class Form1
Dim AVG, nilai1, nilai2 As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
nilai1 = TextBox1.Text
nilai2 = TextBox2.Text
AVG = (nilai1 + nilai2) / 2
TextBox3.Text = AVG
If (TextBox3.Text >= 85 And TextBox3.Text <= 100) Then
TextBox4.Text = "sangat baik"
ElseIf (TextBox3.Text >= 70 And TextBox3.Text < 85) Then
TextBox4.Text = "cukup baik"
ElseIf (TextBox3.Text >= 55 And TextBox3.Text < 70) Then
TextBox4.Text = "kurang baik"
ElseIf (TextBox3.Text >= 0 And TextBox3.Text < 55) Then
TextBox4.Text = "mengulang"
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox4.Clear()
TextBox1.Text = 0
TextBox2.Text = 0
TextBox3.Text = 0
End Sub
End Class