|
ok now that i've gotten that solved heres my renewed program...except now the problem is with alignment of the numbers...i need them to be centerly aligned, any ideas?
// The "Review" class.
import java.awt.*;
import hsa.Console;
public class Review
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
int a, b;
c.print ("a/row:");
a = c.readInt ();
c.print ("b/col:");
b = c.readInt ();
a++;
b++;
int table[] [] = new int [a] [b]; // max for table
for (int row = 1 ; row < a ; row++) //length of rows
{
for (int col = 1 ; col < b ; col++) //length of columns
{
table [row] [col] = row * col;
c.print (table [row] [col] + " ");
}
c.println ();
}
} // main method
} // Review class
|