C# program to multiply two matrices
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Program:
The source code to multiply two matrices is given below. The given program is compiled and executed successfully on Microsoft Visual Studio.
Output:
Explanation:
In the above program, we created a class MatrixDemo that contains a Main() method. The Main() method is the entry point for the program, Here we created three 2-D arrays to represent a matrix.
In the above code, we read two matrices from the user.
Here, we calculated the multiplication of Matrix1 and Matrix2 and assigned the result to the Matrix3. After that, we printed all matrices on the console screen.