public class MultiplicationTable {
public static void main (String[]a){
int[] x;
x = new int[10];
int i;
int n=0;
for (i=0;i
Yes:
String.format("%01d", x[i]*x[j]); is what you want.
If you're familiar with printf
in C then this will be familiar. If not, read the java reference on String.format format strings.
Also, rather than 10 System.out.println
statements, you can use a doubly nested loop with two counters. One to count which row you're in j
and one for each column i
.