WRITE A C PROGRAM QUICKLY ASAP Dynamically allocate a matrix with row and column values as user inpul. Assign random val
Posted: Mon May 02, 2022 11:59 am
WRITE A C PROGRAM QUICKLY ASAP
Dynamically allocate a matrix with row and column values as user inpul. Assign random values to the matrix elements. Implement an encryption function in C to increase the boundary element values of the matrix by the corresponding row mumber, and decrease the non-boundary elements by the corresponding (row+column) number. Also, write the corresponding decryption function (opposite of the above).
Dynamically allocate a matrix with row and column values as user input. Assign random values to the matrix elements. Implement an encryption function in C to increase the boundary element values of the matrix by the corresponding row number, and decrease the non-boundary elements by the corresponding (row+column) number. Also, write the corresponding decryption function (opposite of the above). Sample Test Case: A = 1 2 3 4 5 2 6 7 4 4 1 2 4 7 7 8 7 4 3 2 1 5 3 2 1 B = Encryption(A) = 2 3 4 5 6 1 2 3 4 5 4 2 2 -2 6 2 67 44 4 -3 -2 0 10 Decryption(B) = A = 1 2 4 7 7 12 1 -3 -5 6 7 4 3 2 6 10 8 7 6 1 5 3 2 1 8 Note: In the Sample test case start index is considered from 1.
Dynamically allocate a matrix with row and column values as user inpul. Assign random values to the matrix elements. Implement an encryption function in C to increase the boundary element values of the matrix by the corresponding row mumber, and decrease the non-boundary elements by the corresponding (row+column) number. Also, write the corresponding decryption function (opposite of the above).
Dynamically allocate a matrix with row and column values as user input. Assign random values to the matrix elements. Implement an encryption function in C to increase the boundary element values of the matrix by the corresponding row number, and decrease the non-boundary elements by the corresponding (row+column) number. Also, write the corresponding decryption function (opposite of the above). Sample Test Case: A = 1 2 3 4 5 2 6 7 4 4 1 2 4 7 7 8 7 4 3 2 1 5 3 2 1 B = Encryption(A) = 2 3 4 5 6 1 2 3 4 5 4 2 2 -2 6 2 67 44 4 -3 -2 0 10 Decryption(B) = A = 1 2 4 7 7 12 1 -3 -5 6 7 4 3 2 6 10 8 7 6 1 5 3 2 1 8 Note: In the Sample test case start index is considered from 1.