Java控制台打印乘法口诀表
public void table() {
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= i; j++) {
System.out.print( j + "*" + i + "=" + i * j + "\t" );
}
System.out.println();
}
}
Java控制台打印乘法口诀表
public void table() {
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= i; j++) {
System.out.print( j + "*" + i + "=" + i * j + "\t" );
}
System.out.println();
}
}
本文标题:使用Java打印乘法口诀表
本文链接:https://www.haomeiwen.com/subject/bquhpctx.html
网友评论