Hi cooling9999,

A couple of things:

First, it's a good idea to put your define statements at the top of the file, before you start defining functions.

Secondly, the code does scan in the matrix correctly, so that's good. But then, it simply returns, so there is no call to the print function. You need to add

for(a=0;a<SIZE;a++){

for(b=0;b<SIZE;b++){

fscanf(fptr,"%f", &matrix[a][b]);

}}

print(matrix);

return 0;

On top of that, the print function needs changing. It should read:

int print(float matrix[SIZE][SIZE]){

int a, b;

for(a=0;a<SIZE;a++){

for(b=0;b<SIZE;b++){

printf("%f ", matrix[a][b]);

} printf("\n");

}

Don't use "5" when you have "SIZE" defined. Lastly, don't use the "trix" variable as we want to operate on the "matrix" variable which was passed in. Od, and there needs to be a space after %f to stop the numbers running together.

Cheers!

A couple of things:

First, it's a good idea to put your define statements at the top of the file, before you start defining functions.

Secondly, the code does scan in the matrix correctly, so that's good. But then, it simply returns, so there is no call to the print function. You need to add

for(a=0;a<SIZE;a++){

for(b=0;b<SIZE;b++){

fscanf(fptr,"%f", &matrix[a][b]);

}}

print(matrix);

return 0;

On top of that, the print function needs changing. It should read:

int print(float matrix[SIZE][SIZE]){

int a, b;

for(a=0;a<SIZE;a++){

for(b=0;b<SIZE;b++){

printf("%f ", matrix[a][b]);

} printf("\n");

}

Don't use "5" when you have "SIZE" defined. Lastly, don't use the "trix" variable as we want to operate on the "matrix" variable which was passed in. Od, and there needs to be a space after %f to stop the numbers running together.

Cheers!