Please check my code

expected out ans for 2*2 matrix is 16 and it is printing 5

it prints 16 only