0% found this document useful (0 votes)
16 views2 pages

Form1 Object Eventargs: " De" " Ja" " Vu"

This document contains code for a program with a listbox, radiobuttons and textbox. It takes a number from the textbox and performs logic checks on it using modulo operators, outputting results to the listbox with concatenated strings based on the radiobutton selection and modulo results.

Uploaded by

Rizky Tri Atmojo
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)
16 views2 pages

Form1 Object Eventargs: " De" " Ja" " Vu"

This document contains code for a program with a listbox, radiobuttons and textbox. It takes a number from the textbox and performs logic checks on it using modulo operators, outputting results to the listbox with concatenated strings based on the radiobutton selection and modulo results.

Uploaded by

Rizky Tri Atmojo
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 : Rizqi Tri Atmojo

NIM : 1610512012
Kelas : Bahasa Pemograman VB (B)

Penjelasan

Konfigurasi nama :
Listbox1 = Listbox1
Radiobutton1 = DE JA
VU
Radiobutton2 = Do
While
Radiobutton3 = While
End
Textbox1 = Textbox1
Button1 = Proses
Button2 = Kosongkan

Konfigurasi Syntax
Public Class Form1
Dim a As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim b, c, d, f As String
a = TextBox1.Text
If RadioButton1.Checked Then
If RadioButton2.Checked Then
b = " DE"
c = " JA"
d = " VU"
f = b + c + d
a = 1
Do While a <= Val(TextBox1.Text)
If a Mod 3 = 0 And a Mod 2 <> 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & f)
ElseIf a Mod 3 = 0 And a Mod 2 <> 0 And a Mod 5 <> 0 Then
ListBox1.Items.Add(a & b + c)
ElseIf a Mod 3 = 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & b + d)
ElseIf a Mod 2 <> 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & c + d)
ElseIf a Mod 3 = 0 Then
ListBox1.Items.Add(a & b)
ElseIf a Mod 2 <> 0 Then
ListBox1.Items.Add(a & c)
ElseIf a Mod 5 = 0 Then
ListBox1.Items.Add(a & d)
Else
ListBox1.Items.Add(a)
End If
a = a + 1
Loop
End If
If RadioButton3.Checked Then
b = " DE"
c = " JA"
d = " VU"
f = b + c + d
a = 1
While a <= Val(TextBox1.Text)
If a Mod 3 = 0 And a Mod 2 <> 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & f)
ElseIf a Mod 3 = 0 And a Mod 2 <> 0 And a Mod 5 <> 0 Then
ListBox1.Items.Add(a & b + c)
ElseIf a Mod 3 = 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & b + d)
ElseIf a Mod 2 <> 0 And a Mod 5 = 0 Then
ListBox1.Items.Add(a & c + d)
ElseIf a Mod 3 = 0 Then
ListBox1.Items.Add(a & b)
ElseIf a Mod 2 <> 0 Then
ListBox1.Items.Add(a & c)
ElseIf a Mod 5 = 0 Then
ListBox1.Items.Add(a & d)
Else
ListBox1.Items.Add(a)
End If
a = a + 1
End While

End If
End If
End Sub

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


System.EventArgs) Handles Button2.Click
ListBox1.Items.Clear()
ListBox1.Text = " "
TextBox1.Text = " "
RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False
End Sub

End Class

You might also like