You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
504 B

package main
import (
"unicode"
"./student"
"github.com/01-edu/public/go/lib"
)
func alphaCount(s string) (i int) {
for _, r := range s {
if unicode.IsLetter(r) {
i++
}
}
return i
}
func main() {
table := []string{
" ",
"Hello 78 World! 4455 /",
}
for l := 0; l < 7; l++ {
a := lib.RandIntBetween(5, 20)
b := lib.RandASCII()
table = append(table, lib.RandStr(a, b))
}
for _, arg := range table {
lib.Challenge("AlphaCount", student.AlphaCount, alphaCount, arg)
}
}