Minggu, 08 Desember 2013

program mencari harga photocopy




Soal2 : Program Mencari Harga Photochopy

Desainlah form 1 seperti gambar di bawah ini:



Berikut Listing Programnya:

Public Class Form1

    Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
        If lembar.Text >= 200 Then
            hpl.Text = "100"
        Else
            hpl.Text = "90"
        End If

        total.Text = lembar.Text * hpl.Text


        If total.Text >= 500000 Then
            discount.Text = 0.15 * total.Text
        Else
            discount.Text = "0"

        End If
        pembayaran.Text = total.Text - discount.Text


    End Sub

    Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        End

    End Sub

    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        lembar.Text = ""
        hpl.Text = ""
        total.Text = ""
        discount.Text = ""
        pembayaran.Text = ""
    End Sub
End Class

maka hasilnya :



sekian postingan soal quis 2:
nama: dezy wandrio
npm: 12110485
kelas :s-ip1203

Tidak ada komentar:

Posting Komentar