I keep working understanding dp uva 147 -

This is a good table to see your results - nicely formatted!


public static void print_table( int table[][] ){
 System.out.println( "\n\nPRINTING TABLE ") ;

 System.out.println("\t\tm") ;
  System.out.print("\n        ") ;
 for(int column = 0 ; column <= MAX_AMOUNT; column++){
           System.out.print(  column  + " \t"  ) ;
 }
 System.out.print("\n----------------------------------------------------------------------------------------------------------------------------------") ;
 System.out.println("----------------------------------------------------------") ;
 for(int i = 0 ; i <= NCHANGES ;i++){
   System.out.print("[" + i + "]:  ") ;
         for(int j = 0 ; j <= MAX_AMOUNT  ; j++){

                    System.out.print(table[i][j] + "\t") ;

                 }
                 System.out.println() ;
         }

 }