logo image

Go language program to take a max limit from user and generate a random number till that number

Views: 18

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
We are looking for Interns!
Send your resumes to
[email protected]