You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
372 B
21 lines
372 B
package cap3
|
|
|
|
import "fmt"
|
|
|
|
func _printMatrix(matrix [][]int) {
|
|
for _, row := range matrix {
|
|
for _, val := range row {
|
|
fmt.Printf("%d\t", val)
|
|
}
|
|
fmt.Println()
|
|
}
|
|
}
|
|
|
|
func _makeMatrix(size int) [][]int {
|
|
matrix := make([][]int, size)
|
|
for i := range matrix {
|
|
matrix[i] = make([]int, size)
|
|
}
|
|
|
|
return matrix
|
|
}
|
|
|