public class MulitiplicationTable { public static void main(String[] args) { //九九乘法表 for(int m=1;m<=9;m++) //行 { for(int n=1;n<=m;n++) //列 { System.out.print(m+"*"+n+"="+m*n+"\t"); } System.out.println(); } } }
输出结果: