java經典演算法_015輸出9*9口訣表

來源:互聯網
上載者:User

輸出9*9口訣

package wzs.arithmetics;/** * 輸出9*9口訣 * @author wWX154783 *  */public class Test_wzs15{    public static void main(String[] args)    {        for (int i = 1; i <= 9; i++)        {            for (int j = 1; j <= 9; j++)            {                System.out.print(i + "*" + j + "=" + i * j + "\t");            }            System.out.println();        }        System.out.println();        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();        }        System.out.println();        for (int i = 1; i <= 9; i++)        {            for (int j = i; j <= 9; j++)            {                System.out.print(i + "*" + j + "=" + i * j + "\t");            }            System.out.println();        }    }}

輸出結果:

1*1=11*2=21*3=31*4=41*5=51*6=61*7=71*8=81*9=92*1=22*2=42*3=62*4=82*5=102*6=122*7=142*8=162*9=183*1=33*2=63*3=93*4=123*5=153*6=183*7=213*8=243*9=274*1=44*2=84*3=124*4=164*5=204*6=244*7=284*8=324*9=365*1=55*2=105*3=155*4=205*5=255*6=305*7=355*8=405*9=456*1=66*2=126*3=186*4=246*5=306*6=366*7=426*8=486*9=547*1=77*2=147*3=217*4=287*5=357*6=427*7=497*8=567*9=638*1=88*2=168*3=248*4=328*5=408*6=488*7=568*8=648*9=729*1=99*2=189*3=279*4=369*5=459*6=549*7=639*8=729*9=811*1=12*1=22*2=43*1=33*2=63*3=94*1=44*2=84*3=124*4=165*1=55*2=105*3=155*4=205*5=256*1=66*2=126*3=186*4=246*5=306*6=367*1=77*2=147*3=217*4=287*5=357*6=427*7=498*1=88*2=168*3=248*4=328*5=408*6=488*7=568*8=649*1=99*2=189*3=279*4=369*5=459*6=549*7=639*8=729*9=811*1=11*2=21*3=31*4=41*5=51*6=61*7=71*8=81*9=92*2=42*3=62*4=82*5=102*6=122*7=142*8=162*9=183*3=93*4=123*5=153*6=183*7=213*8=243*9=274*4=164*5=204*6=244*7=284*8=324*9=365*5=255*6=305*7=355*8=405*9=456*6=366*7=426*8=486*9=547*7=497*8=567*9=638*8=648*9=729*9=81

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.