You are given a 2d matrix A of m rows and n colums and you have to generate a matrix B of same dimension but the elements must be a summation of all the previous elements upto now.
For example if A=[{1,2,3},{4,5,6}],
then B =[{1,3,6},{5,12,21}]
Explanation: A(0,0)=B(0,0)
B(0,1)=A(0,0)+A(0,1)
B(0,2)=A(0,0)+A(0,1)+A(0,2)
B(1,0)=A(0,0)+A(1,0)
B(1,1)=A(0,0)+A(0,1)+A(1,0)+A(1,1)
B(1,2)=A(0,0)+A(0,1)+A(0,2)+A(1,0)+A(1,1)+A(1,2)