LOOPING
Seperti yang kita ketahui, looping adalah salah satu cara menghitung nilai yang bersifat banyak yang tidak mungkin kita inputkan 1 sampai 1000 secara manual....dengan adanya looping tentu akan membantu kita dalam mengerjakan sesuatu.....😄
. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.Items.Clear() For nilai = 100 To 1 Step -1 ListBox1.Items.Add(nilai) Next End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ComboBox1.Items.Clear() For tahun = 1980 To 2050 ComboBox1.Items.Add(tahun) Next End Sub Advertise with Anonymous Ads
- Salah satu contoh LOOPING DI VISUAL. STUDIO....
. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.Items.Clear() For nilai = 100 To 1 Step -1 ListBox1.Items.Add(nilai) Next End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ComboBox1.Items.Clear() For tahun = 1980 To 2050 ComboBox1.Items.Add(tahun) Next End Sub Advertise with Anonymous Ads
No comments:
Post a Comment