---
title: "Discussion on \"Go Cheatsheet - Random\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - Random\". Random\nPseudo Random Function\nUse math/rand\npackage main\n\nimport (\n    \"fmt\"\n    \"math/rand\"\n    \"time\"\n)\n\nfunc main() {\n    num := rand.Int()\n    fmt.Println(\"Random Integer:\", num)\n\n    // generate a number [0, 100)\n    num = rand.Intn(100)\n    fmt..."
url: "https://hashnode.com/posts/go-cheatsheet-random/6080973ec99e200d08f838da"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go Cheatsheet - Random](https://hn.0xbf.me/go-cheatsheet-random?utm_source=hashnode&utm_medium=feed)

Random Pseudo Random Function Use math/rand package main import ( "fmt" "math/rand" "time" ) func main() { num := rand.Int() fmt.Println("Random Integer:", num) // generate a number \[0, 100) num = rand.Intn(100) fmt...

Apr 21, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
