Koding Looping Di

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Nama : Ai Ida Parida

NPM : 18401144
Kelas : KAT-R43/18

Nama Project : Perulangan


Desain Menu

Syntax
Public Class Form_Aiida

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles button1.Click
Listhasil.Items.Clear()
Dim i, d, a As Integer
i = NilaiAwal.Text
d = Nilaiakhir.Text
For a = i To d
Listhasil.Items.Add(a)
Next a

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Listhasil.Items.Clear()
Dim a, i As Integer
a = NilaiAwal.Text
i = Nilaiakhir.Text
While (a <= i)
Listhasil.Items.Add(a)
a += 1
End While

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Listhasil.Items.Clear()
Dim a, i As Integer
a = NilaiAwal.Text
i = Nilaiakhir.Text
Do Until a > i
Listhasil.Items.Add(a)
a += 1
Loop
End Sub
End Class

You might also like