August 2019
Beginner to intermediate
798 pages
17h 2m
English
As you already know, multiplying matrices is much more complex than adding or subtracting matrices, which is also shown in the number of command-line arguments that the presented utility, which is named mulMat.go, requires. The mulMat.go utility, which is going to be presented in four parts, requires four command-line arguments, which are the dimensions of the first and the second matrices, respectively.
The first part of mulMat.go is as follows:
package main
import (
"errors"
"fmt"
"math/rand"
"os"
"strconv"
"time"
)
func random(min, max int) int {
return rand.Intn(max-min) + min
}
The second part of mulMat.go contains the following Go code:
func multiplyMatrices(m1 [][]int, m2 [][]int) ([][]int, error) { if len(m1[0]) ...Read now
Unlock full access