Last active
February 16, 2018 05:50
-
-
Save hasinhayder/0dd5c6ec13fbdd96183db36d79fefd78 to your computer and use it in GitHub Desktop.
Say eid mubarak in different ways :D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
commented
Jun 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment