public class SalesCommissions {
public static void main(String[] args){
double[] sales = {5000, 4500, 2000, 5600, 3450, 6500, 0, 0, 3456, 9435};
double[][] total = {{0, 200}, {0, 300}, {0, 400}, {0, 500}, {0, 600}, {0, 700}, {0, 800}, {0, 900}, {0, 1000}};
double temp;
for(int i = 0; i < sales.length-1; i++){
temp = 200 + (sales[i]*0.9);
if(temp >= 1000){
total[i][0]++;
}else if(temp < 1000 && temp >= 900){
total[i][0]++;
}else if(temp < 900 && temp >= 800){
total[i][0]++;
}else if(temp < 800 && temp >= 700){
total[i][0]++;
}else if(temp < 700 && temp >= 600){
total[i][0]++;
}else if(temp < 600 && temp >= 500){
total[i][0]++;
}else if(temp < 500 && temp >= 400){
total[i][0]++;
}else if(temp < 400 && temp >= 300){
total[i][0]++;
}else if(temp < 300 && temp >= 200){
total[i][0]++;
}
}
for(int i = 0; i < total.length; i++){
if(i < 8)
System.out.printf("$" + total[i][1] + "-" + (total[i][1]+99) + " %6.0f\n", total[i][0]);
if(i == 8)
System.out.printf("$" + total[i][1] + "+ " + " %6.0f\n", total[i][0]);
}
}
}