Skip to content

Instantly share code, notes, and snippets.

@hasinhayder
Last active February 16, 2018 05:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save hasinhayder/0dd5c6ec13fbdd96183db36d79fefd78 to your computer and use it in GitHub Desktop.
Save hasinhayder/0dd5c6ec13fbdd96183db36d79fefd78 to your computer and use it in GitHub Desktop.
Say eid mubarak in different ways :D
package main
// :D :D :D :D
import (
"fmt"
"math/rand"
"time"
)
func main() {
letters := [][]string{{"ই", "ঈ"}, {"দ"}, {" "}, {"মো", "মু"}, {"বা"}, {"র", "রা", "রো"}, {"ক"}}
greetings := ""
for _, chances := range letters {
seeder := rand.NewSource(time.Now().UnixNano())
randomizer := rand.New(seeder)
greetings += chances[randomizer.Intn(len(chances))]
}
fmt.Println(greetings)
}
@ehzawad
Copy link

ehzawad commented Jun 29, 2017

letters := [][]string{{"e", "E"}, {"d"}, {" "}, {"mo", "mu"}, {"ba"}, {"ro", "ra", "roo"}, {"k"}}

anyone with console output issue.. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment