1. ## Help me out fellow comrades !

Hi there,

I'm having a problem with a matrix, I cannot figure out a part of the assignment and I hope someone will help me out.
This is the full assignment:

-"Write a program in which you will enter a matrix from the keyboard, find the maximum and minimum element of the matrix and find the average value of those elements, after that every element that is in the matrix which is bigger then the average value change it and put the average value in its place."
(Was translating this and I hope you can understand it.)

The part that is bold and underlined is the part I'm having a problem with.
Any kind of solution is welcome, I'll be brainstorming meanwhile.

Cheers

2. something like this?? I think this is what your asking, although I could be totally wrong
Code:
```for(int i = 0;i < TOTAL_VALUES_IN_MATRIX;i++)
{
if(MATRIX[i]>AVERAGE)
MATRIX[i]=AGERAGE;
}```

3. Originally Posted by YayIguess
something like this?? I think this is what your asking, although I could be totally wrong
Code:
```for(int i = 0;i < TOTAL_VALUES_IN_MATRIX;i++)
{
if(MATRIX[i]>AVERAGE)
MATRIX[i]=AGERAGE;
}```
You ain't wrong, helped me a bunch I just added another for cycle and it worked like a charm. Thanks mate Cheers