You don't have any code to calculate the max. You simply take the larger of nums[0][0] and nums[10][20]. Since (10,20) is an invalid index for nums, there's no telling what might be there.

Oh, and never under any circumstances use a variable, macro, or function named "max" in your program. Same goes for min. It's stupid, but Microsoft has destroyed the usefulness of those names for everyone with their macros. Any code using those names probably won't build correctly in Visual Studio.....