5、利用for循环打印 9*9 乘法表。

public class Test {// 定义类
      public static void main(String[] args) {// 主函数,程序的入口
             for(int i=1;i<=9;i++){
                   for(int j=1;j<i+1;j++){
                           System.out.print(j+"*"+i+"="+j*i+" ");
                   }
                   System.out.println();
             }
      }
}

posted @ 2016-04-23 14:14  小菜鸟的愤怒  阅读(351)  评论(0)    收藏  举报