码迷,mamicode.com
首页 > 编程语言 > 详细

Java经典编程题50道之十六

时间:2017-06-04 22:49:25      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:system   static   ati   ring   ble   example   []   ++   string   

输出九九乘法表。

public class Example16 {
    public static void main(String[] args) {
        table(9);
    }

    public static void table(int n) {
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + j * i+"\t");
            }
            System.out.println();
        }
    }
}

Java经典编程题50道之十六

标签:system   static   ati   ring   ble   example   []   ++   string   

原文地址:http://www.cnblogs.com/qubo520/p/6942052.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!