finding lowest grade of a 2D array

I have it to where the it checks the column for the lowest but at the very end it just spits out a garbage number how can i stop that

1
2
3
4
5
6
  lowestQuiz1 = quizScores[0][0];
		for (row = 1; row < col; row++)	{
			if (lowestQuiz1 > quizScores[row][col])	{
				lowestQuiz1 = quizScores[row][col];
			}
		}
Why do you need a 2D array for a list of grades? Someone could help if you showed an example of how your 2d array is formatted.

Right now, based off that small snippet, it seems your outer array has length less than each inner array, so your outer array goes out of bounds in the loop.
Last edited on
Topic archived. No new replies allowed.