Added matrix exercise
This commit is contained in:
parent
fa8a997395
commit
f140ccceba
|
@ -0,0 +1,3 @@
|
|||
module matrix
|
||||
|
||||
go 1.22.0
|
|
@ -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()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue