I'm really stuck right now..
like 2 hrs now, im tryna figure out a way to get this array in tabular format but its super difficult.
dont really like asking for help but im always grateful for it..
public static void main(String[] args) { int [] [] totals = { {500, 150, 575, 500}, {200, 700, 175, 200}, {300, 75, 100, 400}, {100, 185, 118, 250}, {600, 260, 663, 345} }; System.out.printf("%20s\n\n", "Overall Sales Distribution"); System.out.print(" "); for (int sp = 0; sp < totals[0].length; sp++) System.out.printf("SalesP%d ", sp + 1); System.out.println("Total"); // total sales columns for(int prod = 0; prod < totals.length; prod++) { System.out.printf("Prod%d", prod + 1); for(int sp : totals[prod]) System.out.printf("%5d", sp);