From b7a09f7806084cb5249d660455f5e4bdcca7afb7 Mon Sep 17 00:00:00 2001 From: Sebastian Steger Date: Wed, 20 Aug 2025 06:35:32 +0000 Subject: [PATCH] constants --- go/01-basics/02-constants.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 go/01-basics/02-constants.go diff --git a/go/01-basics/02-constants.go b/go/01-basics/02-constants.go new file mode 100644 index 0000000..c030546 --- /dev/null +++ b/go/01-basics/02-constants.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "math" +) + +const s string = "constant" + +func main() { + fmt.Println(s) + + const n = 500000000 + + const d = 3e20 / n + fmt.Println(d) + + fmt.Println(int64(d)) + + fmt.Println(math.Sin(n)) +} \ No newline at end of file