m_item
buah barang dengan harga m_price
per item ditambah 5% pajak penjualan: [2].CheckBox
dan ComboBox
untuk menghitung jumlah kredit mata kuliah yang diambil oleh seorang mahasiswa (masing-masing mata kuliah = 3 kredit):Dim total As Integer total = 0 ' awal dari jumlah kredit total If (CheckBox1.Checked = True) Then 'boleh memilih semua checkbox total += 3 End If If (CheckBox2.Checked = True) Then total = total + 3 End If If (CheckBox3.Checked = True) Then total = total + 3 End If If (ComboBox1.SelectedIndex = 0) Then 'hanya bisa memilih satu total = total + 3 ElseIf (ComboBox1.SelectedIndex = 1) Then total = total + 3 ElseIf (ComboBox1.SelectedIndex = 2) Then total = total + 3 End If Label3.Text = CStr(total) ' hasil kredit total yang diambil
Tidak ada komentar:
Posting Komentar