| 6 | Scanner sc=new Scanner(System.in); |
| 7 | int A[][],B[],m,n; |
| 8 | void input() |
| 9 | { |
| 10 | Scanner sc = new Scanner(System.in); |
| 11 | System.out.print("Enter the size of the square matrix : "); |
| 12 | m=sc.nextInt(); |
| 13 | if(m<4 || m>10) |
| 14 | { |
| 15 | System.out.println("Invalid Range"); |
| 16 | System.exit(0); |
| 17 | } |
| 18 | else |
| 19 | { |
| 20 | A = new int[m][m]; |
| 21 | n = (m-2)*(m-2); |
| 22 | B = new int[n]; |
| 23 | System.out.println("Enter the elements of the Matrix : "); |
| 24 | for(int i=0;i<m;i++) |
| 25 | { |
| 26 | System.out.print("Enter a value : "); |
| 27 | for(int j=0;j<m;j++) |
| 28 | { |
| 29 | A[i][j]=sc.nextInt(); |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | void convert(int s) |
| 35 | { |
| 36 | int x=0; |