Public Class Form1
Private Sub proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click
If jumlah_lembar.Text >= 200 Then
hpl.Text = 90
Else
hpl.Text = 100
End If
total_harga.Text = hpl.Text * jumlah_lembar.Text
If total_harga.Text >= 500000 Then
discount.Text = 0.15 * total_harga.Text
Else
discount.Text = 0
End If
pembayaran.Text = total_harga.Text - discount.Text
End Sub
Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
jumlah_lembar.Text = ""
hpl.Text = ""
total_harga.Text = ""
discount.Text = ""
pembayaran.Text = ""
End Sub
Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
End
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
3.Lalu jalan kan progam nya dengan menekan F5,Dan hasilnya seperti gambar dibawah ini:


Tidak ada komentar:
Posting Komentar