I am trying to get my program to print the normalized matrix values and the maximums for each column. The output should be organized nicely in rows by columns manner followed by a row of values for each column maximum. For each column of the matrix find the member-cell with maximum value. Divides all the members of that column with the value of that cell. What am I doing wrong here? I am stuck.
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
void DivideArray(int[6][5],int[6][5],int,int);
int main()
{
int theMatrix[6][5];
double a[6][5] = {{1.267, 0.167, 0.250, 2.670, 1.000},
{3.240, 0.376, 0.375, 3.400, 1.128},
{7.564, 0.668, 0.500, 4.303, 1.270},
{5.041, 1.043, 0.625, 5.313, 1.410},
{4.660, 1.502, 0.750, 7.650, 1.693},
{5.727, 2.044, 0.875, 3.600, 2.257}};
cout << "Array: " << endl;
for (int i = 0; i < 6; i++)
{
for (int j=0; j < 5; j++)
{
cout << "array [" << i << "][ "<< j <<"] = " << a[i][j] <<" ";
}
cout << endl;
}
Void DivideArray(int table[6][5], int theMatrix[6][5], int, int,)
{
for (int i=0; i < 6; i++)
for (int j=0; j < 5; j++)
theMatrix[6][5]= table[5][6] / table[6][5];
}
return 0;
}