Translate

Minggu, 02 Juni 2013

Soal Quiz nomor 2



Jawaban Nomor 2.

Public Class Form1
    Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
        If jumlahlembar.Text >= 200 Then
            hargaperlembar.Text = 90
        Else
            hargaperlembar.Text = 100
        End If
        totalharga.Text = hargaperlembar.Text * jumlahlembar.Text

        If totalharga.Text >= 500000 Then
            Discount.Text = 0.15 * 500000
        Else
            Discount.Text = 0
        End If
        pembayaran.Text = totalharga.Text - Discount.Text
    End Sub

    Private Sub BtnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHapus.Click
        jumlahlembar.Text = ""
        Discount.Text = ""
        pembayaran.Text = ""
        hargaperlembar.Text = ""
        totalharga.Text = ""
    End Sub
End Class

Tidak ada komentar:

Posting Komentar