java 写九九乘法口诀:
倒三角形
public class multipy {
public static void main(String[] args) {
System.out.println("********乘法口诀表********");
for (int i = 9;i >0; i--) {
for (int j = 1;j < 10; j++) {
int M = i * j;
if(i>=j) {
System.out.print(i + "*" + j + "=" + M +"\t");
}
}
System.out.print("\n");
}
}
}

三角形

public class multipy1 {
public static void main(String[] args) {
System.out.println("********乘法口诀表********");
for (int i = 1;i<10; i++) {
for (int j = 1;j < 10; j++) {
int M = i * j;
if(i>=j) {
System.out.print(i + "*" + j + "=" + M +"\t");
}
}
System.out.print("\n");
}
}
}
1万+

被折叠的 条评论
为什么被折叠?



