code: public Matrix multiply(double k)
      {
          double pv[][] = new double[nRows][nCols]; // product values
  
          // Compute values of the product.
          for (int r = 0; r < nRows; ++r) {
              for (int c = 0; c < nCols; ++c) {
                  pv[r][c] = k*values[r][c];
              }
          }
  
          return new Matrix(pv);
      }
docs: Multiply this matrix by a constant.
  @param k the constant
  @return the product matrix