算法训练 乘法表

 算法训练 乘法表  
时间限制:1.0s   内存限制:512.0MB
    
问题描述
  输出九九乘法表。
输出格式
  输出格式见下面的样例。乘号用“*”表示。
样例输出
下面给出输出的前几行:
1*1=1
2*1=2 2*2=4
3*1=3 3*2=6 3*3=9
4*1=4 4*2=8 4*3=12 4*4=16
……
public class Main {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        for(int i=1;i<=9;i++){
            for(int j=1;j<=i;j++){
                System.out.print(i+"*"+j+"="+(i*j)+" ");
            }
            System.out.println();
        }

    }

}
原文地址:https://www.cnblogs.com/watchfree/p/5356455.html