1

Hi all! would like some help, hopefully someone can enlighten me.

My program has for input a 2d array where the number of rows and columns is decided by the user.

So in the code below, the matrix A is the input matrix and the matrix Q is the matrix to be calculated with the function maqr.

however, as i'm reusing the matrix A as a 1d array in the function maqr, i'm not too sure how to declare the arrays in his function.

Any help will be apreciated!

```
void main(void)
{
extern int maqr();
int i, j; /* Loop counter */
int w;
int R,C; /* Order of Matrix */
double**A; /* Matrix */
double**Q;
printf("Please enter rows of Matrix A \n");
scanf("%d",&R);
printf("Please enter columns of Matrix A \n";
scanf("%d",&C);
maqr(A,R,C,Q)
A = (double **) malloc(sizeof(double *) * R);
for(i = 0; i < R; i++)
{
A[i] = (double *) malloc(sizeof(double) * C);
}
Q = (double **) malloc(sizeof(double *) * R);
for(i = 0; i < R; i++)
{
Q[i] = (double *) malloc(sizeof(double) * R);
}
int maqr(a,m,n,q)
int m,n;
double a[];
double q[];
```