PROGRAM INPUT HARGA FOTO COPY
___________________________________
Jumlah Lembar : 999
Harga per lembar: 999
Total Harga : 999999
Discount : 9999999
Pembayaran : 9999999
Proses
Jika Jumlah lembar >= 200 HpL = 90 atau HpL = 100
Total Harga = HPL * Jumlah
Jika total harga >500000 discount 15%
Pembayaran = total harga - discount
HpL = Harga per Lembar
PENYELESAIAN
- Desain Form
- Listing Program
Public Class Form2
Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
If JlhLembar.Text >= 200 Then
HPL.Text = 90
Else
HPL.Text = 100
End If
Totalharga.Text = hpl.Text * jlhlembar.Text
If Totalharga.Text > 500000 Then
Diskon.Text = 0.15 * Totalharga.Text
Else
Diskon.Text = 0
End If
Pembayaran.Text = Totalharga.Text - Diskon.Text
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
JlhLembar.Text = ""
HPL.Text = ""
Totalharga.Text = ""
Diskon.Text = ""
Pembayaran.Text = ""
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
Tidak ada komentar:
Posting Komentar