Saya yakin anda pasti tahu huruf hidup bukan? Yap, A, I, U, E, O. Program berikut ini untuk mencari jumlah rekapitulasi huruf hidup tersebut, baik huruf besar maupun huruf kecil.
Silahkan design program visual basic mencari jumlah huruf hidup berikut ini :
Berikut listing program visual basic mencari jumlah huruf hidup.
Private Sub cmduraikan_Click()
Dim xa As Byte
Dim xi As Byte
Dim xu As Byte
Dim xe As Byte
Dim xo As Byte
xa = 0
xi = 0
xu = 0
xe = 0
xo = 0
For i = 1 To Len(Kalimat.Text)
x = Mid(Kalimat.Text, i, 1)
If x = "a" Or x = "A" Then
xa = xa + 1
ElseIf x = "i" Or x = "I" Then
xi = xi + 1
ElseIf x = "u" Or x = "U" Then
xu = xu + 1
ElseIf x = "e" Or x = "E" Then
xe = xe + 1
ElseIf x = "o" Or x = "O" Then
xo = xo + 1
End If
Next i
jmlA.Text = xa
jmlI.Text = xi
jmlU.Text = xu
jmlE.Text = xe
jmlO.Text = xo
End Sub
Mau tahu hasilnya?
lihat saja gambar program visual basic mencari jumlah huruf hidup
Home → Semua Post Berkategori Program Visual Basic Mencari Jumlah Huruf Hidup
Showing posts with label Program Visual Basic Mencari Jumlah Huruf Hidup. Show all posts
Showing posts with label Program Visual Basic Mencari Jumlah Huruf Hidup. Show all posts
Subscribe to:
Posts (Atom)

