diff --git a/matrix/go.mod b/matrix/go.mod new file mode 100644 index 0000000..a8a5e9e --- /dev/null +++ b/matrix/go.mod @@ -0,0 +1,3 @@ +module matrix + +go 1.22.0 diff --git a/matrix/main.go b/matrix/main.go new file mode 100644 index 0000000..b008b98 --- /dev/null +++ b/matrix/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" +) + +func main() { + a := [][]int{ + {0, 1, 2}, + {3, 4, 5}, + {6, 7, 8}, + } + + for i := 0; i < len(a); i++ { + for _, v := range a[i] { + fmt.Printf("%v", v) + } + fmt.Println() + } +}