I could not figure out how to write a function that counts elements greater than given max value in columns of a matrix separately.
Can somone help me, pls!
I tried:
Can somone help me, pls!
I tried:
Code:
int count = 0;
float max = 1.5;
for ( i = 0; i < rows; i++)
for ( j = 0; j < cols; j++)
{
if ( matrix[i][j] > max)
count += 1;
}
[\code]
Above count all the values greater than max but how to report the separately?
Tips/advice would be highly appreciated.
kjb