What are the errors being thrown?
I'm not a C person per se, and I don't have a C compiler here, but if you can point me to the problem, I can still try to help.
From a cursory glance though, here's what I see that could be possible probs:
1. One too many closing braces at the end.
2. Line 28 - for (row = 0, row < max row, row = row + 1) - should be 1 word... maxrow, should be separated by semicolons ; and not commas, use row++ for your incrementer instead of row = row + 1
3. Similar story in Line 30 with the semicolons and the incrementer. Also, lose the semicolon at the end of the line.
4. Line 32 has a comma inside the printf near the end, should probably lose it.
Other than that, looks like you're on the right track.