im trying to convert this code from a 'for' loop to while loop
int row, col, counter = 1, checkCounter = 0;
for (row=0; row<ROWS; row ++)
{
for (col=0; col<COLS; col++)
{
if (array[row][col] != counter) checkCounter = 0;
counter ++;
}
}
if (checkCounter == 1) return 0;
else return 1;

New Topic/Question
Reply



MultiQuote



|