0
我想制作一个“三角”乘法表。它必须有15行和10列,没有重复。必须使用循环。我很难找出这个问题。我留下了额外的专栏。请帮忙!试图制作一个三角形的Java Multiplucation表
Here is what it is supposed to look like
public class q2 {
public static void main(String[] args) {
final int jMax = 15;
final int iMax = 10;
System.out.println("");
System.out.print(" | ");
for (int column = 1; column <= iMax; column++)
System.out.print(column + "\t");
System.out.println();
System.out.print("____________________________________________________________________________");
System.out.println();
for (int i = 1; i <= jMax; i++)
{
if (i>9)
{
System.out.print(i + " | ");
}
else
System.out.print(i + " | ");
for (int row = 1; row <=i; row++) {
System.out.print(i*row + " ");
}
System.out.println();
}
}
}
它现在做了什么? – Matt
完美,现在感谢! – Mike