What do you want to save?
Add Code snippet
New code examples
-
Go 2021-11-06 11:18:11
go generate random number
import ( "math/rand" ) rand.Intn(10) Add solution -
Go 2021-10-18 00:36:06
rock paper scissors in golang
package main import ( "fmt" "math/rand" ) func rpsGame() int { won := false turns := 0 for !won { fmt.Println("Rock Paper Scissors") fmt.Println("1=Rock 2=Paper 3=Scissors") fmt.Println("VVV Enter ... Add solution -
Go 2021-10-03 13:40:02
random number golang
import ( "math/rand" ) rand.Intn(10) Add solution -
Go 2021-10-02 00:23:02
select a random number between 1 and 5 in golang
package main import ( "fmt" "math/rand" "time" #ADDED ) func main() { // Seed should be set once, better spot is func init() rand.Seed(time.Now().UTC().UnixNano()) #ADDED fmt.Println(randInt(1, 1... Add solution
Best helpers
Ranking is empty