System.out.print(" j ");
for (int i = 1; i < 10; i++) {
System.out.print("\t"+i+"\t");
}
System.out.print("\n");
System.out.print("i----------------------------------------------------------------------------------\n");
for (int i = 1; i <= 9; i++) {
System.out.print(""+i+"\t\t");
for (int j = 1; j <= i; j++) {
System.out.print(i + "*" + j + "=" + j * i + " \t");
}
System.out.println(" ");
}
原文:http://blog.51cto.com/357712148/2331238