Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions MatrixMulti.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ public class MatrixMulti {

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int w,x,y,z;
int q,x,y,z;
System.out.println("Enter the number of rows in first matrix : ");
w=scan.nextInt();
q=scan.nextInt();
System.out.println("Enter the number of column in first matrix : ");
x=scan.nextInt();
System.out.println("Enter the number of rows in second matrix : ");
Expand All @@ -15,12 +15,12 @@ public static void main(String[] args) {

if(x==y)
{
int[][]a=new int[w][x];
int[][]a=new int[q][x];
int[][]b=new int[y][z];
int[][]c=new int[w][z];
int[][]c=new int[q][z];

System.out.println("Enter the first matrix row wise : ");
for(int i=0;i<w;i++)
for(int i=0;i<q;i++)
{
for(int j=0;j<x;j++)
{
Expand All @@ -43,7 +43,7 @@ public static void main(String[] args) {



for(int i=0;i<w;i++)
for(int i=0;i<q;i++)
{
for(int j=0;j<z;j++)
{
Expand All @@ -57,7 +57,7 @@ public static void main(String[] args) {
System.out.println("The product matrix is : ");


for(int i=0;i<w;i++)
for(int i=0;i<q;i++)
{
for(int j=0;j<z;j++)
{
Expand Down