Tugas Bahasa Pemrograman 1

Program 1

Tugas 1 . PERKALIAN DUA BILANGAN dengan (hitung)

job 1.1.PNG

job 1.2.PNG

Private Sub Cmdhitung_Click()

herminhasil = Val(hermin1) * Val(hermin2)

 

End Sub

 

Private Sub hermin1_keypress(keyascii As Integer)

If keyascii = 13 Then

hermin2.SetFocus

End If

 

End Sub

 

Private Sub cmdbersih_Click()

hermin1.SetFocus

hermin1 = ” ”

hermin2 = ” ”

herminhasil = ” ”

 

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

 

End Sub

 

Private Sub Text1_Change()

 

End Sub

 

Tugas 2. PERHITUNGAN DUA BILANGAN dengan (enter)

job 2.1.PNG

 

job 2.2.PNG

Private Sub cmdherminbersih_Click()

hermin1.SetFocus

hermin1 = ” ”

hermin2 = ” ”

hermin3 = ” ”

 

End Sub

 

Private Sub cmdherminhitung_Click()

herminhasil = Val(hermin1) * Val(hermin2)

 

End Sub

 

Private Sub cmdherminkeluar_Click()

End

 

End Sub

 

Private Sub hermin1_keypress(keyascii As Integer)

If keyascii = 13 Then

hermin2.SetFocus

End If

 

 

End Sub

 

 

 

Private Sub herminhasil_keypress(keyascii As Integer)

If keyascii = 13 Then

herminhasil = Val(hermin1) * Val(hermin2)

End If

 

 

End Sub

 

 

 

Program 2

Tugas 3 . KALKULATOR MINI dengan (proses)

job 3.1.PNG

job 3.2.PNG

Private Sub cmdproses_Click()

pen3 = Val(pen1) + Val(pen2)

per3 = Val(per1) * Val(per2)

peng3 = Val(peng1) – Val(peng2)

pem3 = Val(pem1) / Val(pem2)

 

End Sub

 

Private Sub cmdlagi_Click()

pen1.SetFocus

 

pen1 = ” ”

pen2 = ” ”

pen3 = ” ”

per1 = ” ”

per2 = ” ”

per3 = ” ”

peng1 = ” ”

peng2 = ” ”

peng3 = ” ”

pem1 = ” ”

pem2 = ” ”

pem3 = ” ”

End Sub

 

Private Sub cmdbatal_Click()

pen1.SetFocus

 

pen1 = ” ”

pen2 = ” ”

pen3 = ” ”

per1 = ” ”

per2 = ” ”

per3 = ” ”

peng1 = ” ”

peng2 = ” ”

peng3 = ” ”

pem1 = ” ”

pem2 = ” ”

pem3 = ” ”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub pen1_keypress(keyascii As Integer)

If keyascii = 13 Then

pen2.SetFocus

End If

 

 

End Sub

 

 

 

Private Sub pem1_keypress(keyascii As Integer)

If keyascii = 13 Then

pem2.SetFocus

End If

 

End Sub

 

Private Sub pem2_keypress(keyascii As Integer)

If keyascii = 13 Then

pem3.SetFocus

End If

 

End Sub

 

 

 

Private Sub pen2_keypress(keyascii As Integer)

If keyascii = 13 Then

per1.SetFocus

End If

 

End Sub

 

 

 

Private Sub per1_keypress(keyascii As Integer)

If keyascii = 13 Then

per2.SetFocus

End If

 

End Sub

 

Private Sub per2_keypress(keyascii As Integer)

If keyascii = 13 Then

peng1.SetFocus

End If

 

End Sub

 

 

 

Private Sub peng1_keypress(keyascii As Integer)

If keyascii = 13 Then

peng2.SetFocus

End If

 

End Sub

 

Private Sub peng2_keypress(keyascii As Integer)

If keyascii = 13 Then

pem1.SetFocus

End If

 

End Sub

 

Private Sub Text3_Change()

 

End Sub

 

 

Tugas 4 . KALKULATOR MINI dengan (enter)

job 4.1.PNG

 

job 4.2.PNG

Private Sub Command1_Click()

Pen3 = Val(pen1) + Val(pen2)

Per3 = Val(per1) * Val(per2)

Peng3 = Val(peng1) – Val(peng2)

Pem3 = Val(pem1) / Val(pem2)

 

End Sub

 

Private Sub cmdlagi_Click()

pen1.SetFocus

pen1 = ” ”

pen2 = ” ”

pen3 = ” ”

per1 = ” ”

per2 = ” ”

per3 = ” ”

peng1 = ” ”

peng2 = ” ”

peng3= ” ”

pem1 = ” ”

pem2 = ” ”

pem3 = ” ”

End Sub

 

Private Sub cmdbatal_Click()

pen1.SetFocus

pen1 = ” ”

pen2 = ” ”

pen3 = ” ”

per1 = ” ”

per2 = ” ”

per3 = ” ”

peng1 = ” ”

peng2 = ” ”

peng3 = ” ”

pem1 = ” ”

pem2 = ” ”

pem3 = ” ”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub pen1_keypress(keyascii As Integer)

If keyascii = 13 Then

pen2.SetFocus

End If

 

 

End Sub

 

Private Sub pem1_keypress(keyascii As Integer)

If keyascii = 13 Then

Pem2.SetFocus

 

End If

 

End Sub

 

Private Sub pem2_keypress(keyascii As Integer)

If keyascii = 13 Then

Pem3 = Val(Text10) / Val(Text11)

End If

 

End Sub

 

Private Sub pen2_keypress(keyascii As Integer)

If keyascii = 13 Then

Per1.SetFocus

Pen3 = Val(pen1) + Val(pen2)

End If

 

End Sub

 

 

 

Private Sub per1_keypress(keyascii As Integer)

If keyascii = 13 Then

Per2.SetFocus

 

End If

 

End Sub

 

Private Sub per2_keypress(keyascii As Integer)

If keyascii = 13 Then

Peng1.SetFocus

Per3 = Val(per1) * Val(per2)

End If

 

End Sub

 

Private Sub peng1_keypress(keyascii As Integer)

If keyascii = 13 Then

Peng2.SetFocus

 

End If

 

End Sub

 

Private Sub peng2_keypress(keyascii As Integer)

If keyascii = 13 Then

Pem1.SetFocus

Peng3 = Val(peng1) – Val(peng2)

End If

 

End Sub

 

 

Program 3

Tugas 5 . PERHITUNGAN HARGA SETELAH DISKON 10 % dengan (hitung)

job 5.1

job 5.2

Private Sub cmdherminhitung_Click()

herminds = Val(herminha) * 0.1

herminhk = Val(herminha) – Val(herminds)

 

 

End Sub

 

Private Sub cmdherminulangi_Click()

herminha.SetFocus

herminha = ” ”

herminha = ” ”

herminha = ” ”

 

End Sub

 

Private Sub cmdherminkeluar_Click()

End

 

End Sub

 

Private Sub herminha_keypress(keyascii As Integer)

If keyascii = 13 Then

cmdherminhitung.SetFocus

End If

 

End Sub

 

 

Tugas 6 . PERHITUNGAN HARGA DISKON dengan (enter)

job 6.1.PNG

job 6.2.PNG

Private Sub cmdhitung_Click()

herminds = Val(herminha) * 0.1

herminhk = Val(herminha) – Val(herminds)

 

End Sub

 

Private Sub cmdulangi_Click()

herminha.SetFocus

herminha = ” ”

herminds = ” ”

herminhk = ” ”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub herminha_Keypress(keyascii As Integer)

If keyascii = 13 Then

herminds = Val(herminha) * 0.1

herminhk = Val(herminha) – Val(herminds)

End If

 

 

End Sub

 

Program 4

Tugas 7 . APLIKASI PERHITUNGAN GAJI dengan (proses)

job 7.1.PNG

job 7.2.PNG

Private Sub cmdproses_Click()

hermingk = Val(hermingp) + Val(hermintj) – Val(herminpt)

herminpj = Val(hermingk) * 0.1

hermingd = Val(hermingk) – Val(herminpj)

 

End Sub

 

Private Sub cmdulang_Click()

hermingp.SetFocus

hermingp = ” ”

hermintj = ” ”

herminpt = ” ”

hermingk = ” ”

herminpj = ” ”

hermingd = ” ”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

Private Sub hermingp_Keypress(keyascii As Integer)

If keyascii = 13 Then

hermintj.SetFocus

End If

 

End Sub

 

Private Sub hermintj_Keypress(keyascii As Integer)

If keyascii = 13 Then

herminpt.SetFocus

End If

 

End Sub

 

Private Sub herminpt_Keypress(keyascii As Integer)

If keyascii = 13 Then

hermingk.SetFocus

End If

 

 

End Sub

 

Tugas 8 . APLIKASI PERHITUNGAN GAJI dengan (enter)

job 8.1.PNG

job 8.2.PNG

Private Sub cmdulang_Click()

hermingp.SetFocus

hermingp = ” ”

hermintj = ” ”

herminpt = ” ”

hermingk = ” ”

herminpj = ” ”

hermingd = ” ”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

 

End Sub

 

 

Private Sub hermingp_Keypress(keyascii As Integer)

If keyascii = 13 Then

hermintj.SetFocus

End If

 

 

End Sub

 

Private Sub herminpt_Keypress(keyascii As Integer)

If keyascii = 13 Then

hermingk = Val(hermingp) + Val(hermintj) – Val(herminpt)

herminpj = Val(hermingk) * 0.1

hermingd = Val(hermingk) – Val(herminpj)

End If

 

 

End Sub

 

Private Sub hermintj_Keypress(keyascii As Integer)

If keyascii = 13 Then

herminpt.SetFocus

End If

 

 

End Sub

 

Private Sub cmdproses_Click()

hermingk = Val(hermingp) + Val(hermintj) – Val(herminpt)

herminpj = Val(hermingk) * 0.1

hermingd = Val(hermingk) – Val(herminpj)

 

End Sub

 

Private Sub proses_Click()

 

End Sub

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s