March 2019
Intermediate to advanced
336 pages
9h 9m
English
In the following code snippet, the printMatrix method takes the input matrix and prints the matrix values by row and traverses the columns for every row:
//printMatrix methodfunc printMatrix(matrix [3][3]int) { var i int var j int //var k int for i=0; i < 3; i++ { for j=0; j < 3; j++ { fmt.Printf("%d",matrix[i][j]) } fmt.Printf("\n") }}
Read now
Unlock full access