java基础编程60题之16

package com.xijiaopractice;


class Test16 {
/*
* 输出 9*9 口诀。
*/
public static void main(String[] args) {
//System.out.print(" ");
for (int i = 1; i < 10; i++) {
//System.out.printf("%6s",i);
}
System.out.println();
for (int i = 1; i < 10; i++) {
for (int j = 0; j < 9; j++) {
System.out.printf("%9s",i+"*"+(j+1)+"="+i*(j+1)+"  ");
}
System.out.println();
}
}
}

猜你喜欢

转载自blog.csdn.net/m0_38068868/article/details/81060683