PROGRAM MELIHAT JUMLAH KARAKTER
PublicClass Form1
PrivateSub
BTNPROSES_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BTNPROSES.Click
Dim HURUF AsString
Dim JML AsByte
Dim X AsString
KARAKTER.Items.Clear()
hurufvokal.Items.Clear()
For I = 1 To 255
X = Chr(I)
JML = 0
For J = 1 To Len(KALIMAT.Text)
HURUF =
Microsoft.VisualBasic.Mid(KALIMAT.Text, J, 1)
If X = HURUF Then JML = JML + 1
Next J
If JML > 0
Then
KARAKTER.Items.Add(" huruf "& X &" = "& JML &" karakter ")
EndIf
Next I
Dim hrfvokal AsString
Dim y AsString
For y = 1 To Len(KALIMAT.Text)
hrfvokal = "AIUEOaiueo"
If y =
hrfvokal Then
hurufvokal.Items.Add(y)
EndIf
Next y
EndSub
PrivateSub
BTNKELUAR_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BTNKELUAR.Click
End
EndSub
PrivateSub
BTNHAPUS_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BTNHAPUS.Click
KALIMAT.Text = ""
EndSub
Tidak ada komentar:
Posting Komentar