From f7cc8cb99a3c64cbe60eb2080deca5bbd0485050 Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Sat, 31 Aug 2024 01:24:44 +0530 Subject: [PATCH] Update OOP/Java/Lab/Week4/MatrixMulp.java --- OOP/Java/Lab/Week4/MatrixMulp.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OOP/Java/Lab/Week4/MatrixMulp.java b/OOP/Java/Lab/Week4/MatrixMulp.java index ec32e1e..765b5df 100644 --- a/OOP/Java/Lab/Week4/MatrixMulp.java +++ b/OOP/Java/Lab/Week4/MatrixMulp.java @@ -43,6 +43,7 @@ class MatrixMulp { } } + // Adding matrices if (m == p && n == q) { int[][] C = new int[m][n]; for (int i = 0; i < m; i++) { @@ -54,6 +55,7 @@ class MatrixMulp { printMatrix(C); } + // Multiplying matrices if (n == p) { int[][] D = new int[m][q]; for (int i = 0; i < m; i++) {