FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 123   



Following program shows you how to take a max limit from user and generate a random number till that number.
In this program we generate a random number using rand.Intn()

package main

import "fmt"
import "math/rand"

func main() {

  fmt.Println(rand.Intn(50))
}

Output:

31



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News