func printChoices(answers map[string]int) { choices := []string{"a", "b", "c", "d"} sort.Strings(choices) // Do a multiple choice with words listed and A B C D for _, choice := range choices { text := num2words.Convert(answers[choice]) fmt.Printf("%s.) %s \n", choice, text) } fmt.Println("q.) Quit") }
func main() { letterCount := 0 for i := 1; i <= 1000; i++ { str := num2words.Convert(i) fmt.Println(str) for _, r := range str { c := string(r) if c != " " || c != "-" { letterCount++ } } } fmt.Println(letterCount) }