java-day19_3
作者:互联网
1、九九乘法表
package struct;
public class ForDemo02 {
public static void main(String[] args) {
for (int j = 1; j <=9; j++) {
for (int i = 1; i <= j; i++) { //注意i<=j
System.out.print(j+"*"+i+"="+(j*i)+"\t"); //这样可以将一类在一行输出
}
System.out.println(); //输出一类之后进行换行
}
}
}
标签:九九乘法,java,struct,package,args,public,day19 来源: https://www.cnblogs.com/lililiee/p/15316344.html