12345
int max; for(int c = 0; c < maximum number of columns; c++){ int s = sum of elements in column c if(c == 0 || s > max) max = s; }