I\'ve to write code for:
Formatting of output can be done using the System.out.format("","") method this method contain two input parameter first define the formatting style and second define value to be print. Let us assume you want to the n digit value right align. you will pass the first parameter "%4d".
For the left align use -ve %-nd
For right align use +ve %nd
for(int i=1; i<13; i++){
for(int j=1; j<13; j++){
System.out.format("%4d", i * j); //each number formatted to a width of 4 so use %4d in the format method.
}
System.out.println(); // To move to the next line.
}