Rabu, 30 Maret 2011
Mod
Mod 4 sisa 3
List Programnya
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
ListBox1.Items.Clear()
For i = 1 To Val(TextBox1.Text)
If (i Mod 4 = 3) Then
ListBox1.Items.Add(i)
End If
Next
End Sub
End Class
Bilangan yang jabis di bagi 7 dan 4
list Programnya
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
ListBox1.Items.Clear()
For i = 1 To Val(TextBox1.Text)
If (i Mod 7 = 0) And (i Mod 4 = 0) Then
ListBox1.Items.Add(i)
End If
Next
End Sub
End Class
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar