I was given a problem that needs to transform a matrix using a specific rule and then print it.
I have a 10x20 double matrix that I need to display in the command prompt using C. However, when it has negative numbers it becomes unorganized. My printing function is this:
int print(const double f[N][M])
{
int i,j;
for (i=0; i<N; i++)
{
for (j=0; j<M; j++)
{
printf ("%.2f ", f[i][j]);
}
printf("\n");
}
return 0;
Thanks in advance for your help!