Fixed median verbose print.

This commit is contained in:
Deathsbreed 2014-04-10 18:06:07 -05:00
parent 62d4d703a8
commit 0cac8482b6

View File

@ -144,10 +144,20 @@ public class MMMCalc {
if(verbose) {
for(int i = 0; i < numArray.length; i++) {
if(i == midVar) {
System.out.print(">" + numArray[i] + "< ");
if(even) {
if(i == midVar - 1) {
System.out.print(">" + numArray[i] + " !" + median + "! ");
} else if(i == midVar) {
System.out.print(numArray[i] + "< ");
} else {
System.out.print(numArray[i] + " ");
}
} else {
System.out.print(numArray[i] + " ");
if(i == midVar) {
System.out.print(">" + numArray[i] + "< ");
} else {
System.out.print(numArray[i] + " ");
}
}
}
System.out.print("\n\n");