please help me out, i want a code of algo by i can find out the solution, i know hoe to multiply 2x2 or 3x3 matrices but i want user friendly code in which user can chose option. help me please its in my project.

Okay... first of all this forum really isn't for just giving away free code, so I doubt anybody will just give you the solution. Now, I assume you are familiar with c++, but judging by your question it is hard to tell. For instance, how are you storing your matrices? is it `type matrix[width][height]`? or maybe `type matrix[width*height]`? or could it be `vector<vector<type>> matrix`? We need more to go off of. On top of that, the way you asked the question makes me think that you haven't even tried to figure this one out yet. I assume you know how to multiply matrices, so try solving the most general case. IE: multiply

``````A B C ... X
D E F ... X
. .  .
. .     .
X X       X
``````

where A,B,C... are just variables. With this matrix:

``````a b c ... x
d e f ... x
. .  .
. .     .
x x       x
``````

While you are doing this think of what the constraints might be? Once you can solve the problem on paper, then you are ready to program it.

As for making the program user friendly, one thing that really helps with that is proper modularization in the code. You should break your code up into as many functions as makes sense. If any function does more than 1 distinct things, it should really be broken up into two things. EG:

``````int f(int a, int b)
{
return a+a*b;
}
//should become:
int add(int a, int b)
{
return a+b;
}
int mul(int a, int b)
{
return a*b;
}
int f(int a, int b)
{
int ret=mul(a,b);