
How many start with ‘a’?
Write a function howManyWithA(words []int) int
that, given a slice of strings, returns the number of strings that begin with a.
To test the function you can use the main
below:
func main() {
const N = 10
:= make([]string, N)
words
for i := 0; i < N; i++ {
.Scan(&words[i])
fmt}
.Println(howManyWithA(words))
fmt}