简单的99乘法表,居然让我找了半天

来源:互联网 发布:高效阅读的软件 编辑:程序博客网 时间:2024/05/02 00:26

public class tables_99 {


public staticvoid main(String[] args) {

// TODO Auto-generated method stub

        for(int a=1; a<=9; a++) {

            for(intb=1; b <= a;b++) {

                System.out.print(a +"x"+b +"="+ a*b+"    ");

                if(a ==b) {

                    System.out.println();

                }

            }

        }   

}


}

0 0