This commit is contained in:
2025-03-01 03:49:56 +05:30
parent d476f2dcd5
commit 8e21732f19

13
get_count.v Normal file
View File

@@ -0,0 +1,13 @@
fn get_count(str string) int {
mut count := 0
for r in 0 .. str.len {
if str[r] == `a` || str[r] == `e` || str[r] == `i` || str[r] == `o` || str[r] == `u` {
count++
}
}
return count
}
fn main() {
println(get_count('hello'))
}