### Please check my code its for Arrays?!

Four experiments are performed and each experiment produces four test results. The results are tabulated as shown below. Write a program to store these results in a two-dimensional array, A[4][5], then use a nested for-loop to compute the average of the test results for each experiment and store it in the 5th column of the array. Print the array.
1st experiment results: | 23.2 | 34.8 | 53.7 | 19.5 |
2nd experiment results: | 34.8 | 42.9 | 28.6 | 35.4 |
3rd experiment results: | 24.5 | 29.5 | 32.0 | 19.3 |
4th experiment results: | 36.8 | 31.6 | 43.7 | 29.5 |

int main(int argc, char *argv[])
{
float A[4][5] =
{ { 23.2, 34.8, 52.7, 19.5, 0 },
{ .... ,....... ,......,......., 0},
{ .... ,....... ,......,......., 0},
{ .... ,....... ,......,......., 0} };

for (int i = 0; i < 4; i++)
{
std::cout << i << " experiment results: ";
for (int j = 0; j < 4; j++)
{
std::cout << A[i][j];
A[i][4] += A[i][j];
}
A[i][4] /= 4;
std::count << A[i][4];
}

return 1;
}
So what's the problem?

 ``12345`` ``````std::count << A[i][4]; // should be std::cout << A[i][4];``````
Topic archived. No new replies allowed.