Your SlideShare is downloading. ×
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
Latihan visual basic 2010/Looping/Perulangan
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Latihan visual basic 2010/Looping/Perulangan

4,704

Published on

Looping

Looping

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,704
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
141
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Latihan Visual Basic 2010 Disusun oleh: Nurul Arhaiyyu 1113000003 Jurusan: Sistem InformasiAsian Banking FinanceAnd Informatics Institute ABFI INSTITUTE PERBANAS
  • 2. PROGRAM PANGKAT
  • 3. Source Code: Private Sub Button2_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button2.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox1.Focus() End Sub Private Sub Button3_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button3.Click Close() End Sub Private Sub Button1_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim nilai As Integer Dim pangkat As Integer Dim i As Integer Dim jumlah As Integer nilai = Val(TextBox1.Text) pangkat = Val(TextBox2.Text) jumlah = 1 For i = 1 To pangkat jumlah = jumlah * nilai Next TextBox3.Text = jumlah End Sub Private Sub Button4_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button4.Click Form1.Show() End SubEnd Class
  • 4. PROGRAM PERULANGAN PENJ
  • 5. PENJELASAN:AWAL: 1AKHIR: 5HASIL: 15Nilai awal+Nilai akhir tetapi secaraperulanganArtinya 1+2+3+4+5 = 15
  • 6. Source Code: Private Sub Button3_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button3.Click Close() End Sub Private Sub Button2_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button2.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox1.Focus() End Sub Private Sub Button1_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim jumlah As Integer Dim awal As Integer Dim akhir As Integer Dim i As Integer awal = Val(TextBox1.Text) akhir = Val(TextBox2.Text) For i = awal To akhir jumlah = jumlah + i Next TextBox3.Text = jumlah End Sub Private Sub Button4_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs)Handles Button4.Click Form2.Show() End SubEnd Class

Ă—