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