Added matrix exercise

This commit is contained in:
raul 2024-02-25 07:34:27 +01:00
parent fa8a997395
commit f140ccceba
2 changed files with 23 additions and 0 deletions

3
matrix/go.mod Normal file
View File

@ -0,0 +1,3 @@
module matrix
go 1.22.0

20
matrix/main.go Normal file
View File

@ -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()
}
}