99乘法表代码
//打印99乘法表(倒三角形) private static void multiplicationtables2() { int x,y; for (y=9;y >= 1;y--){ for (x=1;x <= y;x++){ System.out.print(x + "*" + y + "=" + x*y + "\t"); } System.out.println(); } }
//打印99乘法表(正三角形) private static void multiplicationtables1() { int x1,y1; for (x1=1;x1 <= 9;x1++){ for (y1=1;y1 <= x1;y1++){ System.out.print(x1 + "*" + y1 +"=" + x1*y1 + "\t"); } System.out.println(); }
本文来自博客园,作者:xiaoyongdata(微信号:xiaoyongdata),转载请注明原文链接:https://www.cnblogs.com/xiaoyongdata/p/16267390.html