You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
545 B

import java.math.BigDecimal;
public class LargeDecimals {
public BigDecimal maxOfMins( BigDecimal[][] table ) {
// mom == MaxOfMins
BigDecimal mom = BigDecimal.ZERO;
// mor == MinOfRow
BigDecimal mor;
for (int row = 0; row < table.length;row++) {
mor = table[row][0];
for (int col = 0; col < table[row].length;col++) {
mor = mor.min(table[row][col]);
}
if (row == 0) {
mom = mor;
}
mom = mom.max(mor);
}
return mom;
}
}