(I deleted the whole program because I don't want my school mates to copy it, anyway, sorry for the inconvenience)
These two programs are the homework i needed to do. I had been figuring it out for two weeks. But my mind still seems to be stuck.
The aim of this program is to solve a twoXtwo matrix (just a twoXtwo). I had successfully used another method to finish it before. But the homework requires me to bring in a inverseArray to save the values of the changed array
PHP Code:
void multiplyMatrices(double inverseArray[][2],double multArray[],double oneOverA)
{
multArray[0]=inverseArray[0][0]*inverseArray[2][0]+inverseArray[0][1]*inverseArray[2][1]*oneOverA;
multArray[1]=inverseArray[1][0]*inverseArray[2][0]+inverseArray[1][1]*inverseArray[2][1]*oneOverA;
}
I think the problem seems to be that inverseArray is changed after saving the array. But just don't know what to do with it.
The techniques that are allowed are arrays and the stuff before that. I know I really suck in C++, please help me if anyone knows the solution. Thank you so much.