public class March10thMultiplicationTable {
public static void main(String[] args) {
for (int i = 1; i <10 ; i++) {
for (int j = 1; j <=i; j++) {
System.out.print(i+"x"+j+"="+i*j+" ");
}
System.out.println();
}
}
}
·需要用两层循环来进行乘除
i x j==?
第一行有一个算式
第二行有两个算是
第三行有三个算式...
算式的个数与i的大小有关
网友评论