Buat program menghitung harga tiket dengan ketentuan
Class | Price |
Economy | 100000 |
Bussines | 200000 |
Executive | 300000 |
Total of Price = Sum of Ticket * Price
Jawaban
Obyek | Properti | Pengaturan |
Form | Caption | Ticketing |
Label1 | Caption | Sum Of Ticket |
Text1 | Text | (Kosongkan) |
Frame1 | Caption | Class |
Option1 | Caption | Economy |
Option2 | Caption | Bussines |
Option3 | Caption | Executive |
Label2 | Caption | Price |
Label3 | Caption | Total Of Price |
Text2 | Text | (Kosongkan) |
| Backcolor | (Pilih abu-abu) |
Text3 | Text | (Kosongkan) |
| Backcolor | (Pilih abu-abu) |
Command1 | Caption | Ok |
Command2 | Caption | Exit |
Private Sub Command1_Click()
SOT = Val(Text1.Text)
If Option1.Value Then
P = 100000
ElseIf Option2.Value Then
P = 200000
Else
P = 300000
End If
TP = SOT * P
Text2.Text = P
Text3.Text = TP
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Artikel Terkait:
0 komentar:
Posting Komentar