0

hi,

i need a little help. i have a 2d array adn i want to write out each rows minimum number. but something isnt good cause if the minimum is in the last position it says that the first number is the lowest.

heres the code:

```
void minki(int k,int n, int m, int x[maxn][maxm])
{
int a[n];
int l=0;
for (int i=0; i<n; ++i)
{
int b=x[i][0];
for (int j=0; j<m; ++j)
{
if (b>x[i][j])
{
l=x[i][j];
j++;
}
if (b<x[i][j])
{
++j;
}
else {l=x[i][0];
}
a[i]=l;
cout << "test " << a[i] << endl;
}
}
```