answersLogoWhite

0

import java.io.*;

class mat

{

protected static void main()throws IOException

{

BufferedReader in=new BufferedReader(new InputStreamReader());

int a[][]=new int[10][10];

int b[][]=new int[10][10];

int c[][]=new int[10][10];

for(byte i=0;i<10;i++)

{

for(byte j=0;j<10;j++)

{

System.out.print("Enter the value of a[ "+i+" ][ "+j+"]: ");

a[i][j]=Integer.parseInt(in.readLine());

}

}

for(byte i=0;i<10;i++)

{

for(byte j=0;j<10;j++)

{

System.out.print("Enter the value of b["+i+" ][ "+j+" ]: ");

b[i][j]=Integer.parseInt(in.readLine());

c[i][j]=a[i][j]+b[i][j];

}

}

for(byte i=0;i<10;i++)

{

System.out.println();

for(byte j=0;j<10;j++)

{

System.out.print(c[i][j]+" ");

}

}

}}

User Avatar

Wiki User

15y ago

What else can I help you with?