Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package max;
- public class matrtix {
- public static void main(String[] args) {
- int a[][]={{1,1,0},{1,1,1},{2,2,2}};
- int b[][]={{1,1,0},{1,1,1},{2,0,2}};
- int i,j;
- int c[][]=new int[3][3];
- /* for(i=0;i<3;i++)
- { for(j=0;j<3;j++)
- {
- c[i][j]=a[i][j]+b[i][j];
- }
- }*/
- for(i=0;i<3;i++)
- {for(j=0;j<3;j++)
- {System.out.print((a[i][j]+b[i][j])+" ");
- }
- System.out.println();}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement