日期:2014-05-20  浏览次数:20678 次

问一个显示9*9的乘法口诀表的代码
问一个显示9*9的乘法口诀表的代码
最好是能够按照那种梯形的显示
谢谢!!!

------解决方案--------------------
Java code
public class Test {
  public static void main(String[] args) throws IOException, ClassNotFoundException {
    for (int i = 1; i <= 9; i++) {
      for (int j = 1; j <= i; j++)
        System.out.print(i + "*" + j + "=" + (i * j) + "\t");
      System.out.println();
    }
  }
}