022_综合练习

一、打印九九乘法表   

/**
 * [说明]利用for循环实现九九乘法表
 * @author aeon
 */
public class Cfb {
    public static void main(String[] args) {
        for(int i=1;i<=9;i++){
            for(int j=1;j<=i;j++){
                if(i*j>=10){
                    System.out.print(j+"*"+i+"="+i*j+"	");
                }else{
                    System.out.print(j+"*"+i+"= "+i*j+"	");
                }
            }
            System.out.println();
        }
    }    
}

结果截图:

  

如有任何疑问可联系邮箱: 给我发邮件、或直接联系QQ:1584875179 || 点返回首页

原文地址:https://www.cnblogs.com/aeon/p/9832701.html