how can i solve this 2 problems?!can you please help me?!

Another matrix algebra operation is determining the matrix which is the product of two matrices. This is more challenging extension of the previous problem. The rule governing matrix multiplication is that two can matrices can be multiplied if the number of the columns in the first matrix is equal to the number of rows in the second. The first matrix is the multiplier and the second matrix is the multiplicand. The number of rows in the product matrix will be the number of rows in the first, and the number of the columns in the product matrix will be the number of columns in the second. Stated mathematically,

If A=[a i,j] and B=**, then AB=C=[c i,k]**

Where brackets indicate matrices. For example, if the two given matrices are

a 1.1 a 1.2 a 1.3 a 1.4 b 1.1 b 1.2 b 1.3 b 1.4 b 1.5

a 2.1 a 2.2 a 2.3 a 2.4 b 2.1 b 2.2 b 2.3 b 2.4 b 2.5

a 3.1 a 3.2 a 3.3 a 3.4 and b 3.1 b 3.2 b 3.3 b 3.4 b 3.5

b 4.1 b 4.2 b 4.3 b 4.4 b 4.5

the product is

c 1.1 c 1.2 c 1.3 c 1.4 c 1.5

c 2.1 c 2.2 c 2.3 c 2.4 c 2.5

c 3.1 c 3.2 c 3.3 c 3.4 c 3.5

The values of each element in the product matrix are determined by summing the products of the elements in the row of the first matrix times the elements in a column of the second matrix, for example:

c 1.1 = a1.1*b1.1+ a1.2*b2.1+a1.3*b3.1+a1.4*b4.1

c 1.5 = a1.1*b1.5+a1.2*b2.5+a1.3*b3.5+a1.4*b4.5

c 2.1 = a2.1*b1.1+a2.2*b2.1+a2.3*b3.1+a2.4*b4.1

Write a program which will read the values of any two matrices up to 10 x 10 array and determine the product matrix. Both the given matrices and the product matrix should be printed. For simplicity, use integer elements and plan the program so that the matrix with fewest rows is read first.

and this one..

Write a program to input a string in sentence format. Change all occurence of strings within the sentence with length of 4 to "AHA". Print the original string and the new string.

please help me..

can anyone give me the source code?!