|
|
|
@ -1,4 +1,36 @@ |
|
|
|
public class LargeDecimals { |
|
|
|
public BigDecimal maxOfMins( BigDecimal[][] table ) { |
|
|
|
import java.math.BigDecimal; |
|
|
|
public class LargeDecimals |
|
|
|
{ |
|
|
|
public BigDecimal maxOfMins( BigDecimal[][] table ) |
|
|
|
{ |
|
|
|
BigDecimal[] n1=new BigDecimal[table.length]; |
|
|
|
BigDecimal min= new BigDecimal("0.0"); |
|
|
|
BigDecimal max2= new BigDecimal("0.0"); |
|
|
|
int index=0; |
|
|
|
int i; |
|
|
|
int j; |
|
|
|
int k; |
|
|
|
for( i=0;i<table.length;i++) |
|
|
|
{ |
|
|
|
min=table[i][0]; |
|
|
|
for( j=0;j<table.length-1;j++) |
|
|
|
{ |
|
|
|
if(table[i][j].compareTo(min)==-1) |
|
|
|
{ |
|
|
|
min=table[i][j]; |
|
|
|
n1[index]=min; |
|
|
|
index++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for(k=0;k<n1.length;k++) |
|
|
|
{ |
|
|
|
System.out.print(n1[k]+" "); |
|
|
|
if(n1[k].compareTo(max2)==1) |
|
|
|
{ |
|
|
|
max2=n1[k]; |
|
|
|
} |
|
|
|
} |
|
|
|
return max2; |
|
|
|
} |
|
|
|
} |