Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim namasiswa As String
Dim Nilaifis, Nilaimat, Nilaibio As Single
namasiswa = InputBox(“inputkan nama siswa”, “nama siswa”)
TextBox1.Text = namasiswa
Nilaifis = InputBox(“inputkan nilai fisika”, “nilai fisika”)
TextBox2.Text = Nilaifis
Nilaimat = InputBox(“inputkan nilai mat”, “nilai mat”)
TextBox3.Text = Nilaimat
Nilaibio = InputBox(“inputkan nilai biologi”, “nilai biologi”)
TextBox4.Text = Nilaibio
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ” ”
TextBox2.Text = ” ”
TextBox3.Text = ” ”
TextBox4.Text = ” ”
TextBox5.Text = ” ”
TextBox6.Text = ” ”
TextBox7.Text = ” ”
TextBox8.Text = ” ”
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox5.Text = (Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text)) / 3
TextBox6.Text = (Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text))
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If TextBox5.Text < 60 Then
TextBox7.Text = “Tidak Lulus”
Else
TextBox7.Text = “Lulus”
End If
If TextBox5.Text = 100 Then
TextBox8.Text = “A PLUS”
ElseIf TextBox5.Text > 90 Then
TextBox8.Text = “A”
ElseIf TextBox5.Text > 75 Then
TextBox8.Text = “B”
ElseIf TextBox5.Text > 60 Then
TextBox8.Text = “C”
ElseIf TextBox6.Text > 40 Then
TextBox8.Text = “D”
Else
TextBox8.Text = “E”
End If
End Sub
End Class