Matrix calculation in C: multiplication, division, addition and subtraction