From 7e66776df4951bb6ee5b1069a1a6b1985ff687ad Mon Sep 17 00:00:00 2001 From: vinicius Date: Thu, 10 Oct 2024 23:59:05 -0300 Subject: [PATCH] statement --- src/udemy/go_ted/section12/statement_statement.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/udemy/go_ted/section12/statement_statement.go diff --git a/src/udemy/go_ted/section12/statement_statement.go b/src/udemy/go_ted/section12/statement_statement.go new file mode 100644 index 0000000..7d9c466 --- /dev/null +++ b/src/udemy/go_ted/section12/statement_statement.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" + "math/rand" +) + +func main() { + for i := 0; i < 100; i++ { + if x := rand.Intn(5); x == 3 { + fmt.Printf("loop %v\tx is 3\n", i) + } + } +}