} System.out.println("\n column sum is "); for(i=0;i<3;i++) { for(j=0;j<3;j++) { System.out.print(matrix[i][j]); } System.out.println(); } System.out.println("\n-------------------"); for(i=0;i<3;i++) { s=0; for(j=0;j<3;j++) { s=s+matrix[j][i]; } System.out.print(s+" "); } } } /************Symatric matrix************/ 1 2 3 2 4 5 3 5 6 import java.io.*; class symatric { public static void main(String args[]) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int matrix[][]=new int[3][3]; int i,j,s=0; System.out.println("Enter elements of array "); for(i=0;i<3;i++) { for(j=0;j<3;j++) { matrix[i][j]=Integer.parseInt(br.readLine()); } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { if(matrix[i][j]==matrix[j][i]) s++; System.out.print(matrix[i][j]);
} System.out.println("\n column sum is "); for(i=0;i<3;i++) { for(j=0;j<3;j++) { System.out.print(matrix[i][j]); } System.out.println(); } System.out.println("\n-------------------"); for(i=0;i<3;i++) { s=0; for(j=0;j<3;j++) { s=s+matrix[j][i]; } System.out.print(s+" "); } } } /************Symatric matrix************/ 1 2 3 2 4 5 3 5 6 import java.io.*; class symatric { public static void main(String args[]) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int matrix[][]=new int[3][3]; int i,j,s=0; System.out.println("Enter elements of array "); for(i=0;i<3;i++) { for(j=0;j<3;j++) { matrix[i][j]=Integer.parseInt(br.readLine()); } } for(i=0;i<3;i++) { for(j=0;j<3;j++) { if(matrix[i][j]==matrix[j][i]) s++; System.out.print(matrix[i][j]);