-
-
Save ihsanarifr/8a9807c853a49b2da930ab4e37c21eb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
str := "santekno" | |
count := 0 | |
for _, ch := range str { | |
switch ch { | |
case 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U': | |
count++ | |
} | |
} | |
fmt.Printf("kalimat %s mengandung vokal sebanyak: %d\n", str, count) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment