/* This is a java program to encrypt a matrix using a key. The key is hidden and kept secret and inverse copy of the key is provided to the receiver, with which he/she can decrypt the matrix. The operation performed is matrix multiplication. */ //This is sample program to encode any 2-dimensional matrix using matrix of elememts (i+j) // for 2x2 encoding is done by multiplying given matrix with 0 1 // 1 2 import java.util.Scanner; public class Encoding_Matrix { public static void main(String args[]) { int n; Scanner input = new Scanner(System.in); System.out.println("Enter the base of squared matrices"); n = input.nextInt(); int [][] a = new int[n][n]; int [][] b = new int[n][n]; int [][] c = new int[n][n]; System.out.println("Enter the elements of matrix to be encoded: "); for(int i=0; i