0% found this document useful (0 votes)
27 views

Koding Looping Di

This document contains code for a form with three buttons that each use a different looping structure - For, While, and Do Until - to add numbers between a starting and ending value entered by the user to a list. It includes the student's name, ID number, and class along with the project name of "Perulangan Desain Menu" and code for a class with three button click event handlers using the different loops.

Uploaded by

Ai ida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Koding Looping Di

This document contains code for a form with three buttons that each use a different looping structure - For, While, and Do Until - to add numbers between a starting and ending value entered by the user to a list. It includes the student's name, ID number, and class along with the project name of "Perulangan Desain Menu" and code for a class with three button click event handlers using the different loops.

Uploaded by

Ai ida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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